I was wondering how the OpenGL syntax is translated to the LWJGL. I want to make a game, and I can get an OpenGL book, but how do the syntax calls transfer to the LWJGL? e.g. glBindBuffer() = ?
UPDATE: I'm looking at the LWJGL Javadoc, and now I'm wondering how LWJGL syntax is similar to native C syntax e.g. glVertex3f(1.0f, 1.0f, 1.0f) == C Syntax?
It's almost the same. But you have to use GL* prefixes, so glVertex3f in LWJGL is GL11.glVertex3f. You have to know which OpenGL version contains the function you want to use. You can use static imports, so with import static org.lwjgl.opengl.GL11.*, you can write it like C functions: glVertex3f(...)
Thanks for the info! Now I can make my game!
Quote from: ic5y on July 14, 2013, 14:16:01
It's almost the same. But you have to use GL* prefixes, so glVertex3f in LWJGL is GL11.glVertex3f. You have to know which OpenGL version contains the function you want to use. You can use static imports, so with import static org.lwjgl.opengl.GL11.*, you can write it like C functions: glVertex3f(...)
if I import GL11.*; it can't find the glDOSTUFF methods, i always have to type GL11.glDOSTUFF()... is there a way to fix that?
The functions in GL11 are all static, whereas a regular import only imports non-static methods. Use a static import as shown above.