OpenGL data types
Posted: Sun Dec 27, 2009 11:18 am
Are they really necessary? I can just use the regular old data types in place of them right? Any pros and cons?
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
There are no pros and cons as far as I know of, but what I do know is thier necessary because they are an important part of the OpenGL syntax e.g.davidthefat wrote:Are they really necessary? I can just use the regular old data types in place of them right? Any pros and cons?
Code: Select all
This is correct->
GLuint tex[5];
glBindTexture(GL_TEXTURE_2D, tex[0]);
Code: Select all
This is incorrect->
unsigned int tex[5];
glBindTexture(GL_TEXTURE_2D, tex[0]);
--------------------------------------
Meaning that without them, the wrong texture may show up or no texture will be draw at all.
^ this, gentlemen, is very important when you're trying to develop software for multiple platforms.K-Bal wrote:These #typedefs ensure that your variables always have the same number of bits on each platform. I use them.