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 4 of 4

Thread: MatrixMode, glLoadIdentity, glTranslate, glRotate remvoved from OpenGL new versions?

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2013
    Posts
    20

    MatrixMode, glLoadIdentity, glTranslate, glRotate remvoved from OpenGL new versions?

    One said that the functions like MatrixMode glLoadIdentity glTranslate glRotate will be removed from newer versions of OpenGL. I would like to know if this is true? As I am just begining to use OpenGL and I can't imagine how could anything be made without the calls of this functions?

    What functions could then be used instead of this and why are or will they be removed? I would like to know where is the progress (logic) of this?

    Thanks for the reply.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,200
    They can still be used in (most) newer version of OpenGL just by creating a compatibility context (which is the type of context that is created by default). I say "most" because some drivers may not be able to create such a context, but AFAIK this really only applies to OS X.

    As for what you use instead of them - it's simple. You just use a software matrix library and load the matrix using glUniformMatrix calls. Here it's important to realise that - in the vast majority of cases - glTranslate/glRotate/etc were never really anything more than a software matrix library that was just implemented as part of the OpenGL API. Some exotic older hardware may have implemented them in hardware, but by the era of the NVIDIA TNT/etc they were always just pure software routines.

    The logic behind this is the same as the logic behind all deprecation - removing inessential features in order to make OpenGL easier to implement. OpenGL drivers have a pretty poor reputation and one of the reasons for this was the complexity (and vagueness) of the specification. By making things less complex (and by specifying explicit behaviours) in theory OpenGL driver developers can focus more on essential features.

  3. #3
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    490
    Quote Originally Posted by avstenit View Post
    One said that the functions like MatrixMode glLoadIdentity glTranslate glRotate will be removed from newer versions of OpenGL. I would like to know if this is true?
    Not "will be", but "have been". Those functions don't exist in OpenGL 3+ core profile.

    Quote Originally Posted by avstenit View Post
    As I am just begining to use OpenGL and I can't imagine how could anything be made without the calls of this functions?
    In legacy OpenGL, the only one of those functions which is strictly necessary is glLoadMatrix(); everything else can be implemented on top of that.

    Quote Originally Posted by avstenit View Post
    What functions could then be used instead of this
    In modern OpenGL, you would use glUniform() or a uniform block to pass matrices to the vertex shader. The vertex shader would use those to transform incoming vertices, normals, texture coordinates, etc.

    Quote Originally Posted by avstenit View Post
    and why are or will they be removed?
    They were removed because they were both unnecessary and, for anything beyond "example" programs, pointless. If you need to do anything with the transformed geometry beyond rendering it (e.g. picking, collision, etc), the application needs the transformation matrix, so you may as well just have the application supply the matrix.

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2013
    Posts
    20
    Thanks for the clear answers to all.

Posting Permissions

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