Bitmap textures are pretty important to learn if you want to make simple 2D games and such. Even after reading NeHe's tutorial, I still am having a little trouble with them...I don't think they dumbed it down enough for me.
You can answer as few or as many as you want.
Code:
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f);
Few Questions:
1.) Is glTexCoord2f() needed to be placed before each vertex in order for the texture to appear on the shape?
2.) How exactly do the two parameters in glTexCoord2f() work? Is the first parameter for width, and the second for height or something?
Code:
glGenTextures(1, &texture[0]);
3.) What exactly does that mean?
4.) What's filtering mean? (<- Really dumb question)
5.) Do you have to #include <stdio.h> to have bitmap textures?
6.)GLuint texture[1]; ...
- If this holds textures, does this mean I can only hold one texture unless I change the array?
- Does it hafta be GLUint, or can it just be int?
- What does the "u" stand for in "GLuint"? unsigned?
I apprechiate any help you can give me...I know these questions are pretty stupid.