gdi and double buffering in open gl using glut

Hi,

I am trying to use GLUT_DOUBLE using the windows gdi functions TextOut. Is is not at all possible to do so ??

Currently it works perfectly with GLUT_SINGLE and currently I am thinking about the BitBlt functions but I am not sure how it will help.

From a previous post I see that this is not possible, then is texture mapped fonts or wglUseFontBitmaps the only way ??.

This is my first post here so please bear with me.

Thank You.

Hi !

You are correct, GDI cannot be mixed with doublebuffering, remember that when you are doublebuffering the old frame is visible and you draw to an off screen buffer, GDI draws to the “old” on screen frame and when you swap buffers the new frame will replace the old (the one with the GDI stuff) and your GDI stuff will not be visible.

A solution (a bit slow though) is to render your OpenGL output to a bitmap then you can but GDI stuff on that and put the result in the window, it’s a good chance though that you will not get any hardware acceleration if you do that.

nVIDIAS pBuffers could also be used to get this stuff, but this only work with some GF cards.

Mikael

Mikael

Thats interesting, thank you.