aritugl
10-27-2006, 05:24 AM
I'm trying to draw to a bitmap. The idea is drawing directly to a bitmap in memory, without displaying any window on the screen.
I set OpenGL using glut, with glutCreateWindow, passing a parameter SW_HIDE to avoid the display on screen. After that I create a compatible DC and a compatible bitmap, set an appropiate pixel format and create and make current a rendering context.
My simple scene is a cube with a different color in each face. Faces are GL_QUADS.
The rendering works (colors, size, clipping planes, etc), but in every face you can see a diagonal in a different color.
Drawing the scene directly to a window gives correct results (no visible diagonal). I can't see any difference in the code executed for the two cases.
Any idea ??
I set OpenGL using glut, with glutCreateWindow, passing a parameter SW_HIDE to avoid the display on screen. After that I create a compatible DC and a compatible bitmap, set an appropiate pixel format and create and make current a rendering context.
My simple scene is a cube with a different color in each face. Faces are GL_QUADS.
The rendering works (colors, size, clipping planes, etc), but in every face you can see a diagonal in a different color.
Drawing the scene directly to a window gives correct results (no visible diagonal). I can't see any difference in the code executed for the two cases.
Any idea ??