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 10 of 16

Thread: GLSL: The return to fixed functinoality

Hybrid View

  1. #1
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    3

    GLSL: The return to fixed functinoality

    This seems an obvious question but my google chops seem to be lacking here....

    So with OGL 3 after using a shader you can return to the fixed function pipeline with glUseProgram( 0 ). However with 4 "If program is zero, then the current rendering state refers to an invalid program object and the results of shader execution are undefined." So what is the proper way to return to fixed functionality when you are done with your shader program?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    The core profile of OpenGL 3.2 and above does not allow a "return to fixed functionality." There is no fixed functionality. It was deprecated in 3.0 and removed in 3.1. The compatibility profile of 3.2 brings it back.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,209
    Yeah, bottom line: you want the compatibility profile if you need the fixed-function pipeline. You get this by default.

  4. #4
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    3
    Sorry for the explain it like I'm 5. This means that if I create my context *without* setting the FORWARD_COMPATIBLE and CONTEXT_CORE_PROFILE bits that glUseProgram( 0 ) will cause a return to the old fixed functionality pipeline. Correct?

  5. #5
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    First, you shouldn't be using the FORWARD_COMPATIBLE bit at all. Second, if you want a compatibility profile context, you set the CONTEXT_COMPATIBILITY_PROFILE.

  6. #6
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    3
    Ah. Got it. Ta.

  7. #7
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    167
    This was something I was wondering about lately: The Forward-comp flag is said to actually REMOVE all Features marked deprecated. Does this mean - in practice and theory - that immediate-draw functionality etc. is masked out, eg. requesting pointers to entry Points will return 0?
    Edit: And shouldn't have the Forward-comp Feature been a context-profile and not a flag? Or are there REALLY plans going on to remove (meaning as above) old Features like glVertex in core-contexts?
    Last edited by hlewin; 07-25-2013 at 12:07 PM. Reason: More qs

Posting Permissions

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