stupid question about texturing

how is the damn glBindTexture() working??? i don’t understand in at all! ok… i understand what glBindTexture() should do when i use an used texture name.

but what happens when parameter is unused texture…??? how can i then bind name with some real bitmap???

plz, hlp!!!

Usually to intialize textures you have something like so… (Pseudocode)

foreach texture
{
glBindTexture(someUniqueTexID); // can get unique texIDs with glGenTextures

glTexParameter(); // use this to set mag/min filter and wrap parameters

glTexImage2d(); // use this to specify the texture data

}

Then for drawing you just do:

glBindTexture(texID);
drawObject();

You have to load the bitmap texture first before you can bind it, openGL does not have any texture file loading routines.
So you have ether write one or use someone elses.

I have an example with a TGA bitmap loader, which I use in my examples on my wet site.
GLblackjack and glBall.
http://www.angelfire.com/linux/nexusone/

Originally posted by miko:
[b]how is the damn glBindTexture() working??? i don’t understand in at all! ok… i understand what glBindTexture() should do when i use an used texture name.

but what happens when parameter is unused texture…??? how can i then bind name with some real bitmap???

plz, hlp!!![/b]

tnx, you help me much!