why glDrawRangeElements doesn't work with PFD_DRAW_TO_BITMAP

I have some code that sometimes draws an object to the frame buffer and sometimes to a bitmap.

I changed my code to use glDrawRangeElements to make it faster and it works fine when my code draws to the frame buffer but nothing gets drawn when I setup the pixel format of my DC to render to the bitmap.

No problem with glDrawElements…

It’s probably because you’re getting the Microsoft reference OpenGL implementation when you draw to a bitmap. It doesn’t have any extensions.

Why not use a p-buffer and readback with glReadPixels?

Or if possible render to backbuffer and readback from there.