View Full Version : 2D IN OPENGL, HOW 2?
is there a fast way of doing 2d on ogl(rather than tex mapping all on squares? http://www.opengl.org/discussion_boards/ubb/smile.gif)?
05-14-2000, 10:24 AM
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.
05-15-2000, 11:18 AM
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.
05-16-2000, 03:56 AM
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...
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.