minimal Geom Vertex Format for my UI

Could i create a x,y, u,v, r,g,b,a format thats used for my pixel perfect GUI?

I need x,y and u,v to be integers in 0-4000 (int16) and colors normal at int8 each? So that the total vertex is only 12 bytes each?

Could this be accomplished via the GeomVertexFormat and render efficiently by openGL/directX?

Basically don’t need the Z component and I don’t need float points so i am looking to see if i can save some frame rate by uploading less to the graphics card every frame.

You can certainly create that framebuffer. I can’t say whether it would be rendered efficiently or not; I suppose that depends on your driver. Panda will issue the appropriate OpenGL calls to issue it, though. (In DirectX8 and DirectX9 fixed-function pipeline, there is no facility for integer or two-component coordinates, so Panda will have to re-munge the data before issuing it anyway.)


Will you suggest trying to save a bit of space this way? Or just stick with compatible ways of doing things? I am mainly targeting openGL too… but cards normally target DirectX more.

How to figure out what format is best for the current graphics driver? Geom Munger should know because it convert to it?

No, GeomMunger only respects OpenGL’s interface, it doesn’t know about the graphics driver’s specifics. In fact, OpenGL doesn’t provide any way to ask. The only way is to try it and see what affect it has on performance.

I’ve never experimented with these whacky framebuffer formats, so I couldn’t tell you whether it’s a win or not in the end. I suspect it may not be, but it’s probably worth a try. :slight_smile: