10-30-2014, 02:49 PM -
The reason for the constant definitions is easy to show. Just look at this without the constant aliases
glTexImage2D( 0x0DE1 , 0, 0x8051, 512, 512, 0, 0x1907, 0x1401, data)
and with the constant definitions:
glTexImage2D(GL_TEXTURE_2D , 0, GL_RGB8, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, data)
The function prototypes are there for the same reason they're in any header, so that you can use them and link against something that implements them.
The thing with the OpenGL extensions is just that they are loaded at runtime in some implementations because you can't know at link-time which extensions are available on all system you will be running on.
Anyway, this has nothing to do with rpcs3 specifically and we did not manually write the glext.h header (it's from the official opengl site https://www.opengl.org/registry/api/GL/glext.h ).
glTexImage2D( 0x0DE1 , 0, 0x8051, 512, 512, 0, 0x1907, 0x1401, data)
and with the constant definitions:
glTexImage2D(GL_TEXTURE_2D , 0, GL_RGB8, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, data)
The function prototypes are there for the same reason they're in any header, so that you can use them and link against something that implements them.
The thing with the OpenGL extensions is just that they are loaded at runtime in some implementations because you can't know at link-time which extensions are available on all system you will be running on.
Anyway, this has nothing to do with rpcs3 specifically and we did not manually write the glext.h header (it's from the official opengl site https://www.opengl.org/registry/api/GL/glext.h ).