GLX context creation for an existing window?

Started by
1 comment, last by Finalspace 6 years, 1 month ago

I am starting to get into linux X11/GLX programming, but from every C example i found - there is this XVisualInfo thing parameter passed to XCreateWindow always.

Can i control this parameter later on - when the window is already created? What i want it to change my own non GLX window to be a GLX window - without recreating. Is that possible?

 

On win32 this works just fine to create a rendering context later on, i simply find and setup the pixel format from a pixel format descriptor and create the context and are ready to go.

 

I am asking, because if that doesent work - i need to change a few things to support both worlds (Create a context from a existing window, create a context for a new window).

Advertisement

Forget it, i introduced a callback to prepare a window for graphics api initialization, like SetPixelFormat() on Win32 or glxChooseVisual() on GLX/POSIX. This callback is called before the actual window is being created.

This topic is closed to new replies.

Advertisement