10-30-2014, 03:28 PM -
(10-30-2014, 02:49 PM)Bigpet Wrote: The reason for the constant definitions is easy to show. Just look at this without the constant aliasesWhy can't we use
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( a , 0, b, 512, 512, 0, c, d, data)
in stead of,
glTexImage2D( 0x0DE1 , 0, 0x8051, 512, 512, 0, 0x1907, 0x1401, data)
, This saved us more typing!
Personally, for me, this is more human friendly:
glTexImage2D(GL_TEXTURE_2D , 0, GL_RGB8, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, data)
May be you guys are more robot than human, lol So you use this:
glTexImage2D( 0x0DE1 , 0, 0x8051, 512, 512, 0, 0x1907, 0x1401, data)
in stead of,
glTexImage2D(GL_TEXTURE_2D , 0, GL_RGB8, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, data)
this.