Draw To Bitmap problem

Hello,
I have the following problem.
I want to store the result image after rendering into Bitmap for feature use.
So I make one Bitmap and I draw with OpenGL in it. When I draw directly to View’s DC I get very good performance, but When I’m drawing into Bitmap it’s more than 20 time slower. Why ? How I can get faster drawing ?
Or how I can get the resulting Image into Bitmap ?

The drawing to bitmap is not hardware accelerated, because it happens in the main memory and not in the graphics card. You could render to the screen as normal and read the color buffer values and then store them. But the window must not be obscured.

Kilam.

The problem is that I try the same technique but copy bits are also slow. Or may be I do it wrong?

Create a bitmap space with TexImage2D and the update it with CopyTex[Sub]Image2D …
It’s that simple and is hardware accelerated on a lot of consumer cards at least ( i.e. nVidia TNT/GeForce line )

I’m agree with you, but as I know the different Video Card support different sizes for texture, and they are not so big. Suppose the resolution is 1600x1200 ? How I can create then such big texture ?

Does glTexImage2D create a bitmap in video memory? Is that why it is faster than using CreateBitmap() bitmaps?