How much bandwidth on AGP 4x?

Sorry to ask this on OpenGL, but it relates to my OpenGL peformance.

How much bandwidth (bytes/sec) does AGP 4x have? I seem to be limited to about 4 gigs per second over the bus max, but that seems awefully high. I must have miscalculated something.

AGP 4x => 1,066 GB/s

Ok thanks I made a mistake in my calculation it was about 1Gig where it stalls. The machine can run faster than the video card bus by alot.

That’s why God allows 16-bit integer vertex formats, and the texture matrix.

Also, if your card is snarfing the full gig/second from the memory, then your CPU may not have all that much left to compute data, as a gig/second is the max data rate of PC133 memory (but half the max on DDR266, of course).

I’m a little unsure about using 16 bit integer vertex formats…do you deal with your vertex data as floats, then convert to ints when you send it to the driver? Or do you just store your vertices as ints all the time?
I’d like to see some code dealing with verts like this…I can’t say I’ve ever seen any examples…

If you need to do software processing, then you probably want to keep 'em as floats in memory.

If you just submit data to render, then you should convert to shorts on load (or even keep 'em as floats in the file).

Typically, you’ll decide that the value 1024 for a short means 1.0 in float, so you’ll multiply your float values by 1024 to convert to short (this gives you a range of -32 to +32-epsilon – scale differently for different ranges). Then you’ll have to take this into effect when you create your modelview matrix, and make sure it scales by 1/1024 when you draw the geometry.

There’s really not much more to it than that. Most cards do shorts and floats in hardware (if they do anything in hardware :-), and shorts are half the size of floats.

But if you scale the modelview, you then have to renormalise your normals (assuming you’re using the default opengl lighting model). This isn’t free, even a rescale isn’t free. If you’re not using the default lighting model, you still have to rescale in the vertex program…all this is assuming dynamic lighting of course.
But I assume it’s not as expensive as sending 2X the number of bytes across the bus?