Loading UDEC3 and DEC3N datatypes using VertexAttribPointer

I have a model format that I am trying to load that was designed around Direct3D 9. The geometry data is stored in a buffer and the position and datatypes of the elements are stored in a D3DVERTEXELEMENT9 struct. I am having trouble reading in UDEC3 and DEC3N datatypes though. Now from research it seems the datatype GL_UNSIGNED_INT_10_10_10_2 and GL_INT_10_10_10_2 correspond to this, however these are only for the ES implementation and I am writing this for desktops. However GL_INT_2_10_10_10_REV does work and in the OpenGL wiki they mention to use this instead with the GL_BGRA as a size value. Sadly GL_BGRA gives an access violation (though size 4 does not). What is the correct way to load these datatypes?

If it helps, I am using JOGL for this.

Sadly GL_BGRA gives an access violation (though size 4 does not). What is the correct way to load these datatypes?

If your implementation doesn’t support GL 3.2 or ARB_vertex_array_bgra, then you can’t use it. However, I’m surprised that you’re getting an access violation; I would have expected GL_INVALID_VALUE, for passing an incorrect value.

Then again, you are using JOGL, which may have different behavior when an error is issued.

If you ought to have access to the feature and JOGL is still complaining, then it’s probably a JOGL issue. Since the parameter is technically an integer, it may not accept an enumerator. Depending on how Java deals with this, of course.

[QUOTE=Alfonse Reinheart;1264881]If your implementation doesn’t support GL 3.2 or ARB_vertex_array_bgra, then you can’t use it. However, I’m surprised that you’re getting an access violation; I would have expected GL_INVALID_VALUE, for passing an incorrect value.

Then again, you are using JOGL, which may have different behavior when an error is issued.

If you ought to have access to the feature and JOGL is still complaining, then it’s probably a JOGL issue. Since the parameter is technically an integer, it may not accept an enumerator. Depending on how Java deals with this, of course.[/QUOTE]

I don’t think a missing extension is the issue for BGRA. Checking for ARB_vertex_array_bgra returns true. I’m thinking something breaks as it reads the buffer. It’s strange that putting size as 4 works, but GL_BGRA breaks it.