View Full Version : ? Z buffer misunderstanding ?

04-25-2006, 07:03 AM
I'm confused. I have a texture that is 64x64 and one that is 512x512. When I draw both of them at the same z coordinate, they are the SAME size!?? Is that normal? Shouldn't my 512x512 be alot bigger than the 64x64?

04-25-2006, 07:11 AM
no, just more detailed.
Texture size has nothing to do with how much space it will take up on the screen since the texture coordinate system goes from 0 to 1.

04-25-2006, 07:28 AM
Let's say I have a enemy character that is supposed to be 2 times larger than my main character in a game, How would I proportionately show them according to their positions on the z axis?

04-25-2006, 07:56 AM
The size of an object is defined by the position of it's vertices (the glVertex* calls) and the transformations (modelview and projection matrix) at the time it is drawn.

To make an object twice as big as another one, either use vertex positions twice as large, or apply a scaling transformation to one of the objects (glScalef(2, 2, 2) for the larger one, for example).