Jump to content


glDrawPixels useful?


3 replies to this topic

#1 Apocalypse

    New Member

  • Members
  • PipPip
  • 24 posts

Posted 31 October 2006 - 12:55 PM

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
Apocalypse, the End of the World.

#2 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1052 posts

Posted 31 October 2006 - 01:23 PM

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.

#3 Apocalypse

    New Member

  • Members
  • PipPip
  • 24 posts

Posted 31 October 2006 - 01:50 PM

ok thank you.:happy:
Apocalypse, the End of the World.

#4 TheNut

    Senior Member

  • Moderators
  • 1473 posts
  • LocationThornhill, ON

Posted 01 November 2006 - 12:09 AM

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...

Posted Image
http://www.nutty.ca - Being a nut has its advantages.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users