LWJGL Forum
Programming => Bug Reports / RFE => Topic started by: ra4king on August 06, 2014, 04:29:03
-
Hi,
I found some more duplicate enums, with default class name in bold:
- GL_TEXTURE_1D: GL11, GL43
- GL_TEXTURE_2D: GL11, GL43
- GL_TEXTURE_3D: GL12, GL43
- GL_TEXTURE_2D_ARRAY: GL30, GL43
- GL_QUADS: GL11, ARBTessellationShader
I wrote a tool that automatically finds duplicates, so I have a million more duplicates! Is it best to send a pull request with the removed duplicates in LWJGL 2/3?
-
Thanks, they have been removed. I also have a tool that detects duplicates, just hadn't run it on LWJGL 3 before.
It's normal that you've found so many duplicates, but most of the duplicate constants in extensions cannot be removed. It's only OK to remove those that have been defined in a core version less than or equal to the minimum version an extension requires (e.g. ARB_shader_subroutine requires GL 3.2 so UNIFORM_SIZE and UNIFORM_NAME_LENGTH, defined in GL 3.1, could safely be removed). I did this manually in LWJGL 2 (might have missed some, let me know if you find any), but I plan to "annotate" extensions in LWJGL 3 with the minimum core spec required, so that future cleanup can be done automatically.
-
Why do you not use Java enums instead of integer values?
This would be much easier to manage in my opinion.
-
Enums vs integers has been discussed on JGO recently, here (http://www.java-gaming.org/topics/opengl-why-are-lwjgl-enums-as-integers/33800/view.html).
-
Let me paste all duplicates I've found in core versions:
- GL_UNIFORM_SIZE: GL31, GL40
- GL_TEXTURE_RECTANGLE: GL31, GL43
- GL_UNIFORM_NAME_LENGTH: GL31, GL40
- GL_STACK_OVERFLOW: GL11, GL43
- GL_TEXTURE_CUBE_MAP: GL13, GL43
- GL_TEXTURE_1D_ARRAY: GL30, GL43
- GL_IMAGE_FORMAT_COMPATIBILITY_TYPE: GL42, GL43
- GL_TEXTURE_BUFFER: GL31, GL43
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GL30, GL32
- GL_DOUBLE_MAT4x2: GL40, GL41
- GL_DOUBLE_MAT4x3: GL40, GL41
- GL_SCISSOR_BOX: GL11, GL41
- GL_NUM_SAMPLE_COUNTS: GL42, GL43
- GL_DOUBLE_MAT3x4: GL40, GL41
- GL_DOUBLE_MAT3x2: GL40, GL41
- GL_DEPTH_RANGE: GL11, GL41
- GL_SAMPLES: GL13, GL43
- GL_VIEWPORT: GL11, GL41
- GL_SCISSOR_TEST: GL11, GL41
- GL_DOUBLE_MAT2x4: GL40, GL41
- GL_DOUBLE_MAT2x3: GL40, GL41
- GL_DOUBLE_VEC4: GL40, GL41
- GL_DOUBLE_VEC3: GL40, GL41
- GL_DOUBLE_VEC2: GL40, GL41
- GL_TEXTURE_2D_MULTISAMPLE_ARRAY: GL32, GL43
- GL_STACK_UNDERFLOW: GL11, GL43
- GL_LAST_VERTEX_CONVENTION: GL32, GL41
- GL_DOUBLE_MAT4: GL40, GL41
- GL_DOUBLE_MAT3: GL40, GL41
- GL_DOUBLE_MAT2: GL40, GL41
- GL_TEXTURE_COMPRESSED: GL13, GL43
- GL_TEXTURE_2D_MULTISAMPLE: GL32, GL43
- GL_FIRST_VERTEX_CONVENTION: GL32, GL41
- GL_MAX_VARYING_COMPONENTS: GL30, GL32
- GL_TEXTURE_CUBE_MAP_ARRAY: GL40, GL43
- GL_RENDERBUFFER: GL30, GL43
- GL_SRC1_ALPHA: GL15, GL33
- GL_PROVOKING_VERTEX: GL32, GL41
So basically, GL40-43 have most of the duplicates.
-
You're probably using 2.9.1, some of these were removed months ago and there's none in the latest nightly.
-
Thanks, using the latest nightly now, no duplicates found!