×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    OpenGL ES 2 shaders in new Belle devices

    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:
    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.
    What could cause this problem? Is there something specific/new with the latest Belle devices?

    Regards,
    Last edited by pixsta; 2012-02-13 at 09:01.

Similar Threads

  1. Replies: 3
    Last Post: 2012-01-09, 08:38
  2. Belle firmware for older devices
    By pippo2010 in forum Publishing to Nokia Store
    Replies: 5
    Last Post: 2011-12-10, 09:41
  3. Which devices support OpenGL ES1.1?
    By MobileVisuals in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-09-09, 11:19
  4. OpenGL ES on pre F1 devices
    By henpe008 in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2008-10-28, 07:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×