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: 10,000 gl_ a line...

  1. #1
    Junior Member Regular Contributor Julien Cayzac's Avatar
    Join Date
    Aug 2001
    Location
    Yokohama, Japan
    Posts
    230

    10,000 gl_ a line...

    Why are all the shading language's built-in variables/constants beginning with "gl_" ?
    Won't OpenGL 2.0 shaders be meant to be used by OpenGL 2.0 API only ?
    I suggest defining new types such as OPENGL20SHADERVARYINGVEC3F, OPENGL20SHADERVARYINGMAT4F, and so on

    Julien.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2002
    Posts
    12

    Re: 10,000 gl_ a line...

    To protect our shaders against future D3D releases eating gl sources?

    Ciao,
    zom.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: 10,000 gl_ a line...

    At a guess, it's the usual reason for namespace prefixes. It allows the ARB to introduce new builtins later without having to worry about breaking existing shaders. Unless the shader writers called their variables gl_foo, of course, in which case they deserve to be broken.

Posting Permissions

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