I use two QGLShaderProgram’s for processing the texture.
ShaderProgram1->bind(); // QGLShaderProgram
ShaderProgram2->bind();
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();
ShaderProgram1->release();
ShaderProgram2->release();
The texture should be processed with Shaderprogram1 and then ShaderProgram2. But when I call ShaderProgram2->bind() automatically fires ShaderProgram1->release() and only one shader works. How do I bind both shaders?
↧