PDA

View Full Version : glDrawPixels() optimization



morbac
05-29-2003, 10:26 AM
I write a program that must support a SynthaGram monitor. In few words, it is a display that can render depth effect without having to use special glasses.

Before sending framebuffer that contains stereo images to display, I have to process it so it is converted to an "interzigged" format for monitor (the final image merges the stereo images). This is done by a library that was designed for the monitor (source is not available). After processing, I must send transformed image back into framebuffer for rendering.

This is currently done by a glDrawPixels() call, but it is dawn slow and I wish to know if there is a magic way to do this fastly.

Note that monitor needs exact pixel precision to perform 3d effect. This has to consequence that processed image can't be rescaled or smoothed. Final result must be the same as glDrawPixels() result.

Thanks for help.

kieranatwork
05-29-2003, 10:33 AM
Use glTexSubImage coupled with a screen aligned quad, with GL_NEAREST filtering, and an identity projection & modelview matrix.
I've been playing with one of those SynthaGram monitors myself - aren't they the COOLEST thing ever!?
It's like being in bladerunner, or something.

morbac
05-29-2003, 03:21 PM
Hey http://www.opengl.org/discussion_boards/ubb/wink.gif That's cool !! It is about 30 times faster now http://www.opengl.org/discussion_boards/ubb/wink.gif Thanks !

wintal
05-29-2003, 06:49 PM
Originally posted by kieranatwork:
Use glTexSubImage coupled with a screen aligned quad, with GL_NEAREST filtering, and an identity projection & modelview matrix.
I've been playing with one of those SynthaGram monitors myself - aren't they the COOLEST thing ever!?
It's like being in bladerunner, or something.


The 42 inch synthagram is the best one of these I've played with so far. Low res (which means you can get decent framerates http://www.opengl.org/discussion_boards/ubb/smile.gif) but very good (especially off-screen) effect. Those high res 20 inch ones are near impossible to get decent interactive framerates with http://www.opengl.org/discussion_boards/ubb/wink.gif