is there a fast way of doing 2d on ogl(rather than tex mapping all on squares? )?
What’s wrong with texmapping squares? it’s fast and easy…
Here are some optimisations tips.
If you have a background that cover the entire screen, instead of texturemap that huge polygon. Render it once, and then use the accumulation buffer to store that background and reload it every frame from the accumulation buffer.
If you need to change a texture often, instead of re-creating your texture map everytime, use glTexSubImage. It replaces the content of the texture with the new values you give.
But if he doesn’t have a hardware acc-buffer isn’t that gonna be slow?
Saving in the accumulation buffer is slow.
But if you do that just one time then, you will gain some speed.
Reloading is not that fast also, but much faster texturing mapping a 1024 X 768 polygon.
<inhales sharply> what about saving it in an aux buffer? if you’re on an sgi or a system that supports pixelsmaps, what about saving it in a pixmap?
ogl does a float multiply per pixel on operations to and from the acc buffer. True, if you set the scale to 1.0, the driver MIGHT be clever enough to not multiply per pixel.
I’m not sure it would be faster, especially on newer cards that do multiple pixels per clock… I should bench that…
Hey, Help Me, if you do go the accumulation buffer route, make sure you load the buffer with GL_LOAD instead of GL_ACCUM, because that WILL skip the multiply on loading the acc-buffer…