Question About OpenGL Performance using Memory DC

I am a beginner. I am not sure whether this is the right place to ask the following question. thank you.

An OpenGL Application renders snowworld, whose size is 1024 x 768.

Method 1. Create OpenGL render context using window DC.
The load of CPU is below 1%.

Method 2. Create OpenGL render context using memory DC.
Copy the content in memory DC to the window DC using bitblt.
The load of CPU is below 100%.

Why the load in method 2 is so heavy? how to optimize the performance using memory DC?

Thank you very much!

Memory DC is not accelerated by your graphics card. If you want offscreen rendering, use the framebuffer object extension.

Thank Zengar very much!

Where can I find the document about framebuffer object extension.

simple sample on how to use them:
http://www.codesampler.com/oglsrc/oglsrc_14.htm#ogl_frame_buffer_object

spec:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt

http://www.opengl.org/wiki/index.php/GL_EXT_framebuffer_object

Other samples:
http://www.g-truc.net/sample-ogl2.html#sample11
http://www.g-truc.net/sample-ogl2.html#sample10
http://www.g-truc.net/sample-ogl2.html#sample09
http://www.g-truc.net/sample-ogl2.html#sample08
http://www.g-truc.net/sample-ogl2.html#sample07
http://www.g-truc.net/sample-ogl2.html#sample06

And for the adventurous OpenGL 3.0 enthusiast, FBO is now in the core spec

http://www.opengl.org/registry/doc/glspec30.20080923.pdf

Currently requires an NVIDIA GeForce 8xxx or better with the drivers to be found over here

http://developer.nvidia.com/object/opengl_3_driver.html

More info in the thread over here

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=243747#Post243747

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.