pfd_draw_to_bitmap and accelerated device

Hi

I render on a bitmap on win** using the PFD_DRAW_TO_BITMAP flag set, because I need to have a backbuffer.

But I learn that bitmap rendering is never accelerated.

So, is there a way to use a back buffer and having accelerated device ?

I’d like to have something that could work on any implementation of OpenGL.

If all you want is to use a backbuffer, just use PFD_DOUBLEBUFFER. To swap the buffer, you then use the API function SwapBuffers(hDC);

Originally posted by Deiussum:
If all you want is to use a backbuffer, just use PFD_DOUBLEBUFFER. To swap the buffer, you then use the API function SwapBuffers(hDC);

The problem is that PFD_DOUBLEBUFFER can’t be used with PFD_DRAW_TO_BITMAP

Having a backbuffer and doing offscreen rendering are 2 different things. I you want offscreen rendering for some reason, you are stuck with PFD_DRAW_TO_BITMAP and dont get acceleration; if you just want to have a backbuffer to avoid tearing, then use PFD_DOUBLE_BUFFERED.