I'm currently working on an Android project that involves OpenGL ES development. However, I've encountered an issue where I can't seem to find the definition for GL_INT_2_10_10_10_REV when working with GLES on Android.
This definition is particularly useful for normal and tangent vertex storing due to its compact representation.
Is this define supposed to be available on Android GLES? If so, where can I find its definition or documentation? If not, what alternative approach should I consider for achieving the same functionality?
Any insights or guidance on this matter would be greatly appreciated. Thank you!
Checked the GLES headers included in my project, but couldn't locate the definition. Searched through the Android NDK documentation and OpenGL ES specifications but couldn't find any mention of GL_INT_2_10_10_10_REV.
OpenGL ES 2.0 does not support
GL_INT_2_10_10_10_REV
as vertex attribute data format, the definition ofGL_UNSIGNED_INT_2_10_10_10_REV_EXT
you found inGLES2/gl2ext.h
is defined in extensionGL_EXT_texture_type_2_10_10_10_REV
and is valid only as texture type forTexImage2D
orTexImage3D
when this extension is available.However, OpenGL ES 2.0 with extension
GL_OES_vertex_type_10_10_10_2
supportsGL_UNSIGNED_INT_10_10_10_2_OES
andGL_INT_10_10_10_2_OES
vertex attribute data formats, so it can be used, if you can change packing of values.Still, support in OpenGL ES 2.0 requires some work to check extensions and some devices may not support required extensions. Because formats are supported only with extensions, their definitions are found in
GLES2/gl2ext.h
OpenGL ES 3.0 supports
GL_INT_2_10_10_10_REV
vertex attribute data format (also it's supported as texture data type) in basic specification, so it can be used for any devices with support of OpenGL ES 3.0 and its definition can be found inGLES3/gl3.h
in NDK.