Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Kingbombs

macrumors member
Original poster
Jun 24, 2009
98
0
Hey just a quick question

So if the texture is to small for an object that is going to have that texture applied to it, what happens? does it grow in size to fit it or just not be applied at all or leave some parts of it not applied.

on the flip side:
If the texture is larger than the area it is going to be applied to it, then what happens? does it shrink or put the texture on till it covers it then leaves what ever texture is left off.

I seem to have problems with my whole program being covered in the texture rather than just the item being drawn.
If i bind a texture, like:
glVertexPointer(2, GL_FLOAT, 0, squareToBeDrawn);
glBindTexture(GL_TEXTURE_2D, textures[1]);
then do: glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
can i unbind the texture? Because everything not just this square is getting textured by the texture i just binded. Or am i making a mistake?
Will this draw the square with this texture and then if i unbind it, will all the next set of glDrawArrays() use the last glColor4f() that was used? And will this square that was drawn still have the texture applied to it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.