Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


OpenGL Slow OpenGL backdrop...

This topic is 6583 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m using a windowed OpenGL app and using
to draw a bitmap to screen, it works fine except that I''ve timmed these 2 lines at 0.1 seconds for each frame. Concidering I''m using it for video decompression at 15fps, this is not good:-(To put this in prespective, my video compression takes 0.08 seconds to do the actuall decompression(With dct''s and color conversion.), and I havn''t begun to optimise it yet....) How do I get this faster? Concidering there is no format conversion, it should be lightning quick, so why? -Lethe

Share this post

Link to post
Share on other sites
glDrawPixels() is just a very slow command, and you''ll have to learn to live with that. Directly writing to the framebuffer is not recommended, so you''ll have to deal with it in a slightly different way.

What you can do is decompress your video data (640x480) to a 1024x512 buffer. This wastes some memory, but you can use that buffer as a texture, and you can then display the video by rendering a single texturemapped quad that fills your window. For best performance, use glCopyTexSubImage2D() to update only the 640x480 portion of the texture for every frame.

- Tom

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!