LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: mireazma on February 26, 2014, 14:46:34

Title: GL_BLEND, GL_DEPTH_TEST, GL_DITHER etc. enum
Post by: mireazma on February 26, 2014, 14:46:34
What's the name of the mentioned enumeration? I want to create a byte array based on its name and size. I suppose LWJGL has this enum. I've googled it but I only found GetBooleanPName.
Title: Re: GL_BLEND, GL_DEPTH_TEST, GL_DITHER etc. enum
Post by: Cornix on February 26, 2014, 15:31:24
These are integers in LWJGL, and they are the same integers as in any C++ bindings. If you know their value you can simply use that.

If you want to use the constants in LWJGL you usually do it like this:
int enumCnst = GL11.GL_DEPTH_TEST;
Title: Re: GL_BLEND, GL_DEPTH_TEST, GL_DITHER etc. enum
Post by: mireazma on February 26, 2014, 15:44:20
I know they're integer constants but I thought (could have bet) they're organized in an enum. If they're not, the only reason I can think of now it's probably because they may be scattered in different GL versions...
Title: Re: GL_BLEND, GL_DEPTH_TEST, GL_DITHER etc. enum
Post by: Cornix on February 26, 2014, 16:45:52
Nope, they are not enums. (Although I would have preferred if they were)
But yes, they are scattered in different gl versions and you have to know in which they are. (which is a pain in the butt)

This is definitely one thing that could have been made better in my opinion.
Title: Re: GL_BLEND, GL_DEPTH_TEST, GL_DITHER etc. enum
Post by: mireazma on February 26, 2014, 22:25:36
Thanks for clearing this out.