* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "freeglut_internal.h"
ATTRIB_VAL( GLX_ACCUM_ALPHA_SIZE, 1 );
}
+ if( fgState.DisplayMode & GLUT_AUX1 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 1 );
+ if( fgState.DisplayMode & GLUT_AUX2 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 2 );
+ if( fgState.DisplayMode & GLUT_AUX3 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 3 );
+ if( fgState.DisplayMode & GLUT_AUX4 )
+ ATTRIB_VAL( GLX_AUX_BUFFERS, 4 );
+
+
/* Push a null at the end of the list */
ATTRIB( None );
}
FREEGLUT_INTERNAL_ERROR_EXIT( window->Window.VisualInfo != NULL,
- "Unable to get window visual info", "fgOpenWindow" );
+ "Visual with necessary capabilities not found", "fgOpenWindow" );
/*
* XXX HINT: the masks should be updated when adding/removing callbacks.
*/
winAttr.event_mask =
StructureNotifyMask | SubstructureNotifyMask | ExposureMask |
- ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyRelease |
+ ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask |
VisibilityChangeMask | EnterWindowMask | LeaveWindowMask |
PointerMotionMask | ButtonMotionMask;
winAttr.background_pixmap = None;
}
#endif
- glXMakeCurrent(
- fgDisplay.Display,
- window->Window.Handle,
- window->Window.Context
- );
-
/*
* XXX Assume the new window is visible by default
* XXX Is this a safe assumption?
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
&fgDisplay.DeleteWindow, 1 );
+ glXMakeCurrent(
+ fgDisplay.Display,
+ window->Window.Handle,
+ window->Window.Context
+ );
+
XMapWindow( fgDisplay.Display, window->Window.Handle );
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE