Hello,
I am using QGLWidget for displaying graphics. I use fragement-shader based effects for texturing. The fragment shaders are changed dynamically during runtime. This works fine on "old" Symbian^3 (incl. Anna and Belle) devices such as the N8, C7, E7, etc. But on newer devices such as the 700 or 701 loading of shaders works fine but switching does not work sometimes. I am using Qt OpenGL functionality and all functions return "true" (e.g. linking, binding, etc.).
Here are some details:
What could cause this problem? Is there something specific/new with the latest Belle devices?Code:QGLShaderProgram program; void linkShaders(QString code, QString code2) { // Change shader dynamically (all return true) program.removeShader(m_fragShader); program.removeShader(m_vertexShader); m_fragShader->compileSourceCode(code); program.addShader(m_fragShader); m_vertexShader->compileSourceCode(code2); program.addShader(m_vertexShader); program.link(); } void paintGL() { QPainter painter; painter.begin(this); painter.beginNativePainting(); program.bind() // draw something here which should be textured program.release(); painter.end(); swapBuffers(); } // Switch shaders test 1 linkShaders(shader1...); // works linkShaders(shader2...); // works linkShaders(shader1...); // does not work // Test the same thing another time (random results) linkShaders(shader1...); // does not work linkShaders(shader2...); // works linkShaders(shader1...); // does not work etc.
Regards,



