For developers: GL14.GL_MIRRORED_REPEAT missing?

Started by ndhb, September 03, 2007, 04:18:05

Previous topic - Next topic

ndhb

Hi devs.

Shouldn't the constant for texture wrapping GL_MIRRORED_REPEAT be defined in the class GL14 as it was promoted to core from the extension GL_ARB_texture_mirrored_repeat in OpenGL 1.4 according to specifications 2.1, p. 336. I can only find it in ARBTextureMirroredRepeat.GL_MIRRORED_REPEAT_ARB.

kind regards,
Nicolai de Haan Brøggers

Matzon

yes, you are correct. I will look into parsing the http://opengl.org/registry/api/enumext.spec and checking for missing/wrong/misplaced enums.

ndhb


Matzon

Just a quick status. I am now successfully parsing the spec, and have identified some issues.
I have identified 52 missing fields, however to make this "perfect" I actually have to do the reverse process to check that all the fields of our classes are defined and is the correct value. For instance:
GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB is marked as missing, but in fact it's just the wrong name in our code:
GL_TEXTURE_IMAGE_SIZE_ARB

I'll update the files when I have the reverse mapping going...

sample output below: (not sure if spec parser will go into code base, since it's a hackjob  ::))


QuoteMissing: GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB in ARBTextureCompression
Missing: GL_SUBTRACT_ARB in ARBTextureEnvCombine
Missing: GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV in NVTransformFeedback
Missing: GL_OFFSET_TEXTURE_2D_BIAS_NV in NVTextureShader
Missing: GL_OFFSET_TEXTURE_2D_MATRIX_NV in NVTextureShader
Missing: GL_OFFSET_TEXTURE_2D_SCALE_NV in NVTextureShader
Missing: GL_TABLE_TOO_LARGE in ARBImaging
Missing: GL_MIN_PROGRAM_TEXEL_OFFSET_NV in NVGpuProgram4
Missing: GL_MAX_PROGRAM_TEXEL_OFFSET_NV in NVGpuProgram4
Missing: GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_INPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_TRIANGLE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_VERTICES_OUT_EXT in NVGeometryProgram4
Missing: GL_LINES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_OUTPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT in NVGeometryProgram4
Missing: GL_TRIANGLES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT in NVGeometryProgram4
Missing: GL_LINE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_PROGRAM_POINT_SIZE_EXT in NVGeometryProgram4
Missing: GL_FOG_COORD in GL15
Missing: GL_SRC1_ALPHA in GL15
Missing: GL_CURRENT_FOG_COORD in GL15
Missing: GL_SRC1_RGB in GL15
Missing: GL_FOG_COORD_SRC in GL15
Missing: GL_FOG_COORD_ARRAY_POINTER in GL15
Missing: GL_FOG_COORD_ARRAY_BUFFER_BINDING in GL15
Missing: GL_FOG_COORD_ARRAY_STRIDE in GL15
Missing: GL_SRC0_RGB in GL15
Missing: GL_SRC2_RGB in GL15
Missing: GL_SRC0_ALPHA in GL15
Missing: GL_SRC2_ALPHA in GL15
Missing: GL_FOG_COORD_ARRAY_TYPE in GL15
Missing: GL_FOG_COORD_ARRAY in GL15
Missing: GL_SMOOTH_LINE_WIDTH_RANGE in GL12
Missing: GL_SMOOTH_POINT_SIZE_RANGE in GL12
Missing: GL_SMOOTH_LINE_WIDTH_GRANULARITY in GL12
Missing: GL_TEXTURE_BINDING_3D in GL12
Missing: GL_SMOOTH_POINT_SIZE_GRANULARITY in GL12
Missing: GL_MIRRORED_REPEAT in GL14
Missing: GL_FLOAT_MAT2x4 in GL21
Missing: GL_FLOAT_MAT2x3 in GL21
Missing: GL_FLOAT_MAT3x2 in GL21
Missing: GL_FLOAT_MAT3x4 in GL21
Missing: GL_FLOAT_MAT4x2 in GL21
Missing: GL_FLOAT_MAT4x3 in GL21
Missing: GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV in NVFramebufferMultisampleCoverage
Missing: GL_MULTISAMPLE_COVERAGE_MODES_NV in NVFramebufferMultisampleCoverage
Missing: GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT in EXTFramebufferMultisample
Missing: GL_MAX_SAMPLES_EXT in EXTFramebufferMultisample
Total enum count: 1729
Confirmed: 1677
Failed: 0
Missing: 52

spasi

QuoteMissing: GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV in NVTransformFeedback
It's missing from the spec too. Actually glext.h defines GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV and is missing GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV, which the spec defines. It has the same value btw.

QuoteMissing: GL_MIN_PROGRAM_TEXEL_OFFSET_NV in NVGpuProgram4
Missing: GL_MAX_PROGRAM_TEXEL_OFFSET_NV in NVGpuProgram4
That's weird. The spec defines these tokens, with the EXT postfix, in EXT_gpu_shader4. The NV_gpu_program4 spec also mentions these tokens, with the note "these tokens are shared with the EXT_gpu_shader4 extension.", that's why I didn't copy them there. On the other hand, nVidia's glext.h defines the tokens with the NV postfix and only in NV_gpu_program4. ???

QuoteMissing: GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_INPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_TRIANGLE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_VERTICES_OUT_EXT in NVGeometryProgram4
Missing: GL_LINES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_OUTPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT in NVGeometryProgram4
Missing: GL_TRIANGLES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT in NVGeometryProgram4
Missing: GL_LINE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_PROGRAM_POINT_SIZE_EXT in NVGeometryProgram4
These tokens exist in EXT_geometry_shader4.

The multisample tokens were added in later spec revisions. I just redownloaded every spec there is to be sure. ;D

Matzon

Quote from: spasi on September 04, 2007, 10:55:52
QuoteMissing: GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV in NVTransformFeedback
It's missing from the spec too.
No, its just called: MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV, under NV_transform_feedback enum

Quote from: spasi on September 04, 2007, 10:55:52
QuoteMissing: GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_INPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_TRIANGLE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_VERTICES_OUT_EXT in NVGeometryProgram4
Missing: GL_LINES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_GEOMETRY_OUTPUT_TYPE_EXT in NVGeometryProgram4
Missing: GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT in NVGeometryProgram4
Missing: GL_TRIANGLES_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT in NVGeometryProgram4
Missing: GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT in NVGeometryProgram4
Missing: GL_LINE_STRIP_ADJACENCY_EXT in NVGeometryProgram4
Missing: GL_PROGRAM_POINT_SIZE_EXT in NVGeometryProgram4
These tokens exist in EXT_geometry_shader4.

The multisample tokens were added in later spec revisions. I just redownloaded every spec there is to be sure. ;D
yeah, but if you look at the spec, then the enums should be defined in NV_geometry_program4 and then EXT_geometry_shader4 should point to those. The values are the same.

The parser basically builds up a hashmap and then using reflection investigates each of our classes for that enum. However I am not sure how we should go about stuff that is different in glext.h provided by nV ?

spasi

When I say spec, I mean these documents:

NV_transform_feeback
NV_geometry_program4
EXT_geometry_shader4

which are what I've always used to make the LWJGL templates.

I'm not sure how enumext.spec is generated, but one thing's for sure: enumext.spec, nVidia's glext.h and the official specification documents do not match.

I'm not sure what we're supposed to do about this, but someone reading the above documents and hoping to make use of these extensions, would expect to find a MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV in NV_transform_feeback and the other tokens in EXT_geometry_shader4. It's no big deal tbh, since they're simple tokens, only their arithmetic values are important.

Matzon

For starters we could mirror the enums so that they're in both classes.

Wonder if the ati headers differ from nV ?

renanse

Is this moving ahead?  I was looking in vain for ARBTextureEnvCombine.GL_SUBTRACT and a search on the forums brought me here.

Matzon

The ball got a bit dropped on this, since we can't rely on any official spec file, since it differs from vendor to vendor (yay!).
However, GL_SUBTRACT is available in GL13 as in ARBTextureEnvCombine <-- in HEAD/TRUNK
we will do a release shortly, which have updated files (spasi updated this http://cia.vc/stats/project/LWJGL/.message/653fa)

renanse