diff --git a/src/framework/graphics/painterogl2.cpp b/src/framework/graphics/painterogl2.cpp index 9f6eb574..6906cc2b 100644 --- a/src/framework/graphics/painterogl2.cpp +++ b/src/framework/graphics/painterogl2.cpp @@ -100,7 +100,8 @@ void PainterOGL2::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode) m_drawProgram->setAttributeArray(PainterShaderProgram::TEXCOORD_ATTR, nullptr, 2); } else m_drawProgram->setAttributeArray(PainterShaderProgram::TEXCOORD_ATTR, coordsBuffer.getTextureCoordArray(), 2); - } + } else + PainterShaderProgram::disableAttributeArray(PainterShaderProgram::TEXCOORD_ATTR); // set vertex array if(hardwareCached) { @@ -112,6 +113,9 @@ void PainterOGL2::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode) // draw the element in coords buffers glDrawArrays(drawMode, 0, vertexCount); + + if(!textured) + PainterShaderProgram::enableAttributeArray(PainterShaderProgram::TEXCOORD_ATTR); } void PainterOGL2::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture)