PDA

View Full Version : pfd_draw_to_bitmap and accelerated device



eddy63
09-27-2002, 04:17 AM
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.

Deiussum
09-27-2002, 04:28 AM
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);

eddy63
09-27-2002, 04:42 AM
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

kehziah
09-27-2002, 05:22 AM
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.