PDA

View Full Version : glDrawPixels useful?


Apocalypse
10-31-2006, 05:55 AM
I want to make a menu (a 2D menu) in OpenGL; Should I use glDrawPixels()\glPixelZoom() to draw the images or create flat polygons with the respective texture applied? Which method is faster and better?:huh:

thanks in advance

Mihail121
10-31-2006, 06:23 AM
The second is a LOT faster. Use an orthographic projection and polygons, since they are processed by the hardware, while glDrawPixels is a software operation, which operates on video memory and is therefore the slowest thing in universe.

Apocalypse
10-31-2006, 06:50 AM
ok thank you.:happy:

TheNut
10-31-2006, 05:09 PM
Pretty much what Mihail121 said. Not only is it a better performer, it’s logically much easier to implement. You can also get creative later and add textures to your menus, blending, transformations, etc...

http://www.nutty.ca/tmp/gui.jpg