Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: switch GL/GLSL mode

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    France
    Posts
    11

    switch GL/GLSL mode

    Hi,

    I want to compare the performances beetween classic Opengl and Shading Language. The idea is to insert a button in order to chose the implementation.

    But, once shaders were activated, I can't inactivate them, even if I destroy the programm. How can I switch easily beetxeen these two functionning?

    If someone can answer me or point toward a topic

    Thanks

  2. #2
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,007

    Re: switch GL/GLSL mode

    Bind program 0 (zero) and you will return to fixed function.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2005
    Location
    France
    Posts
    11

    Re: switch GL/GLSL mode

    Thanks! It was so simple

    if(shader_activate){
    glUseProgram(PhongProg);
    }else{
    glUseProgram(0);
    }

Posting Permissions

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