Question about OpenGl native data types in LWJGL

Started by Nick, July 22, 2012, 08:47:24

Previous topic - Next topic

Nick

Hello!

Please tell me how I can create variables of type GLint or GLboolean in LWJGL?
Which package do I need to use? In the source code it's described in org.lwjgl.util.generator.opengl.*
But Eclipse/Intelij does not see org.lwjgl.util.generator.

Thanks!

moci

There are no OpenGL datatypes, you'll have to use buffers such as ByteBuffer, FloatBuffer, IntBuffer, ... to send and store data. When a function needs a yes or no value you can use GL_TRUE or GL_FALSE, but these are still integer values (not as a buffer).

You can use regular Java datatypes as well, the methods do not require you to use OpenGL datatypes. So if you see a tutorial that uses "GLint" you can probably just use "int", if they use "Glint[]" you can use "IntBuffer".