Im currently working with OpenGL to draw 2D at 24 fps using images stored on disk. Im using C++ arrays which is dynamically allocated to store the framebuffer data. To draw the pixels Im using glDrawPixels.
Everything works fine but I need more speed, I want to be able to draw fullscreen images like 1280x700…my current setup is to slow for this, what is the best way to do something like this? Do I need a faster machine or is there a better way to draw pixels using OpenGL?
How about using your bitmap data as a texture and plastering it onto some quads or something? A.K.A. Texture Mapping.
Oh yeah and if your 2D thingys are like animating you will need glCopyTexSubImage or something.
You can think of my 2D data app as a movie player or something, nothing advanced, the only thing I need is to be able to zoom +/- which works fine glPixelZoom and glViewport…no prob.
Do you have a code sample of the texture app? Something simple…
Thanks for the reply!
Ah, I think NeHe has just the tutorials for you. He has a few different articles about texture mapping and even one about playing an avi on an object like it was a texture; pretty cool stuff. The URL is http://nehe.gamedev.net but gamedev.net seems to be down right now, well for me it is. Maybe it will work for you.
Yeah, got no connection but I’ll check the AVI tutorial, sounds like its exactly what I need, a example not using glDrawPixels…
Thanks for the link!