Friday, February 8, 2008

VisualChooser in DGLWindow.cpp

As near as I can tell, the VisualChooser is just a class where you set the
attrbutes of RenderSurface. It's used by Producer.

I see that DGLWindow is creating a VisualChooser and setting its attributes.
Later in the code it creates a new RenderSurface and assigns the
VisualChooser to it:

m_surface->setVisualChooser(m
_chooser);

Later it's used in the ralize() method, which actually creates the window.

m_surface->realize(m_chooser,
m_parentWindow->getRenderSurface()->getGLContext());

The code for that is specific to each platform- Window, X11, OS X. In the
X11 code, if the chooser isn't passed it uses the one you set it too
earlier.

Anyway, just think of it as a class that stores attributes of a window.

No comments: