Open GIPdA opened 5 years ago
Not certain it's done the right way (maybe a glActiveTexture(GL_TEXTURE0);
should be done before leaving?), but I got it solved! Needs testing on other platforms though.
---
src/pathview/glview.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/pathview/glview.cpp b/src/pathview/glview.cpp
index dd98e58..5c45788 100644
--- a/src/pathview/glview.cpp
+++ b/src/pathview/glview.cpp
@@ -883,7 +883,7 @@ void GLView::drawTexts()
m_textProgram->setUniformValue(m_textAlignmentLocation, static_cast<GLint>(textParameters->alignment));
m_textProgram->setUniformValue(m_textColorLocation, textParameters->color);
m_textProgram->setUniformValue(m_textModelMatrixLocation, textParameters->modelMatrix);
- m_textProgram->setUniformValue(m_textTextureLocation, texture->textureId());
+ m_textProgram->setUniformValue(m_textTextureLocation, 1);
if (m_selectionModeActive) // selection mode active
{
@@ -892,9 +892,10 @@ void GLView::drawTexts()
m_currentDrawableId++;
}
- texture->bind(texture->textureId());
+ glActiveTexture(GL_TEXTURE1);
+ texture->bind();
glDrawArrays(GL_TRIANGLES, 0, vertexBuffer->size() / static_cast<int>(sizeof(TextVertex)));
- texture->release(texture->textureId());
+ texture->release();
}
m_textProgram->disableAttributeArray(m_textPositionLocation);
--
Hello
The PathView control is crashing the macOS Machinekit Client when activated in Cetus. Either with the latest MachinekitClient binary or by building it manually. Same issue under macOS 10.13 (High Sierra) or 10.12 (Sierra).
The issue seems to come from drawTexts() in glview.cpp.
I don't know how to fix it, but I can test any patch, I have Machinekit building in QtCreator (Qt5.12.1 64bit). No crash occurs after removing the calls to drawTexts().
Let me know if you need any more details :) Thank you, Benjamin
Here is part of the crashlog: