Hello Guest

About the OpenGL version suffix.

  • 2 Replies
  • 7266 Views
About the OpenGL version suffix.
« on: April 09, 2008, 12:03:31 »
OpenGL features of different OpenGL specification versions were "placed" to different classes, like GL11, GL12, GL13, GL14, GL15, GL20, GL21.  Does this mean I have to lookup which version of OpenGL specification a feature is defined in before using it? Is there any solution to this problem?
Code like GL11.glEnable(GL20.GL_POINT_SPRITE) is really inconvenient.

Hope I am understood :-[

*

Offline kappa

  • *****
  • 1319
Re: About the OpenGL version suffix.
« Reply #1 on: April 09, 2008, 12:15:00 »
Yes the different versions have been placed in different classes this makes it easier to aim for a particular version of opengl.

You can however easily get around this in java using static imports.

example on using it can be found here http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html

Re: About the OpenGL version suffix.
« Reply #2 on: April 09, 2008, 12:42:28 »
Yes the different versions have been placed in different classes this makes it easier to aim for a particular version of opengl.

You can however easily get around this in java using static imports.

example on using it can be found here http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
Thanking you for replying.

It seems that I need to study the new features in java 5.