PDA

View Full Version : Fastest method to draw pixels on screen!



joda
11-01-2002, 10:56 PM
Hey!

I've been using OpenGL's glDrawPixels to draw images on screen in my application. What is the fastest way to do it? Right now Im working with an array of images that I've loaded to memory then I pass them to glDrawPixels....is there any other way to do this? Im looking for speed cause Im using it in a flipbook app.

Thanks!

/Joda

Asgard
11-02-2002, 02:39 AM
glDrawPixels is slow, if you use it every frame, as it always reads the image data from host memory. It's faster to upload your image in form of a texture to video memory once and then render a textured quad every frame.

joda
11-02-2002, 05:58 AM
Hey!

Okey, is there any tutorial on how to do this, basically the only thing I need is the abillity to Zoom which is use to use with a glPixelZoom command.

A code sample would be great!

Thanks for the reply!

- Joda



Originally posted by Asgard:
glDrawPixels is slow, if you use it every frame, as it always reads the image data from host memory. It's faster to upload your image in form of a texture to video memory once and then render a textured quad every frame.



AdrianD
11-02-2002, 07:28 AM
before you draw your quad:
glScalef(1,2,1);