LWJGL
May 22, 2012, 03:36:33 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Are all the GL functions there?  (Read 2014 times)
blingo
Newbie
*
Posts: 2


« on: October 17, 2008, 08:37:57 »

Hello, new to LWJGL,
love it already, as it was a smooth sailing on Eclipse.

Learning the Red Book,
tried to find glColor3fv, and also some OpenGL Type Definitions,
are they all there?

Many thanks.
Logged
Ciardhubh
Talks Too Much
***
Posts: 159


« Reply #1 on: October 20, 2008, 03:13:54 »

tried to find glColor3fv, and also some OpenGL Type Definitions,
are they all there?

OpenGL functions are named slightly different. The f, v, i, etc. suffixes indicate the type (f = float) and v in OpenGL is a pointer to an array containing the type. As there are no pointers in Java, the v is omitted. It's glColor3f(...). If the parameter type is obvious (e.g. FloatBuffer as parameter), even the f is omitted.

You also have to find the right class the method is in; named after the version it had been introduced in OpenGL (i.e. GL11, GL15, GLU, etc). Some functions are in ARB extensions and not one of the GLXX classes.

Since you are using Eclipse, it's probably easiest to use auto-completion. For example type GL11.glColor3 and hit Strg+Space. This should give you a list of options. If you are completely lost and cannot find the class the method is in, just search the LWGJL source code (e.g. search for glcolor).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!