Pixelformat good or evil?

heya all,

here’s the thing, when you want to set opengl on a window, you get the hDC and do the whole shabang specifing the pixelformat and creating the context.

what if i want to change the pixelformat on an allready running window with set pixel format.
specifically i want to switch STEREO on and off.

Microsoft documentation follows:

Setting the pixel format of a window more than once can lead to significant complications for the Window Manager and for multithread applications, so it is not allowed. An application can only set the pixel format of a window one time. Once a window’s pixel format is set, it cannot be changed.
sounds grim, but i am betting there is a workaround :wink: (especialy if such exists without doing window/handle juggling…)

Destroy window and create a new one.
I don’t think there is a better workaround.

i am working over vc7.

i can recreate the handle to the control

Control.RecreateHandle()

and set the new pixel format and the device context over the new handle, but i want to preserve the previos gl redering context, particulary i want all my loaded textures. plobable?

got it done… thnx

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.