View Full Version : glVertex3s

11-22-2000, 03:53 AM
i want to specify input values in screen coords but don't know how about depth.
what is the range for this value assuming 16-bit depth buffer?
i tried 0-65535 but it didn't work

is this command slower than glVertex3f ? - are shorts internally converted to floats?


11-22-2000, 04:47 AM
The depthrange depends on how you setup your viewing volume. It's the two last arguments in glOrtho/glFrustum/gluPerspective (depending on which one you use to setup projection matrix) that determine the depthrange. It doesn't matter what function you use, glVertex*s, glVertex*f, they all work the same. And the number of bits in the depthbuffer got nothing to do with the depthrange, only the resolution of the buffer.

And for speed, I think using floats should be fastest, even though it can't be that much difference unless you pass loads of vertices.

11-23-2000, 02:52 AM
thnx very much!
silly me, i've completly forgotten about glOrtho http://www.opengl.org/discussion_boards/ubb/frown.gif(

i have another question about parameters to glTexCoords4s
using floats i specify glTexCoords4f( s/z, t/z 0.0, 1/z)
but what in case of shorts ?