X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffreeglut_window.c;h=6217627dad6fb4695a4f8235419804e8655f3cc5;hb=65e03872c287ab34ae76bd1831a3786d5e986b72;hp=2fc1d298c21be6474f14126f8c9f5483739601e9;hpb=2ea7e1534b6ff0db4b835608c8b2d2c18629a19e;p=freeglut diff --git a/src/freeglut_window.c b/src/freeglut_window.c index 2fc1d29..6217627 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "../include/GL/freeglut.h" +#include #include "freeglut_internal.h" /* @@ -268,11 +268,12 @@ void fgOpenWindow( SFG_Window* window, const char* title, * XXX simplify this. */ if( !window->IsMenu ) - window->Window.VisualInfo = fgChooseVisual( ); + window->Window.VisualInfo = fgChooseVisual( ); else if( fgStructure.MenuContext ) window->Window.VisualInfo = fgChooseVisual( ); else { + /* XXX Why are menus double- and depth-buffered? */ unsigned int current_DisplayMode = fgState.DisplayMode ; fgState.DisplayMode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH ; window->Window.VisualInfo = fgChooseVisual( ); @@ -310,7 +311,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, window->State.IsOffscreen = GL_FALSE; if( fgState.DisplayMode & GLUT_OFFSCREEN ) { - window->State.IsOffscreen = GL_TRUE; + window->State.IsOffscreen = GL_TRUE; window->Window.Pixmap = XCreatePixmap( fgDisplay.Display, fgDisplay.RootWindow, w, h, @@ -336,11 +337,8 @@ void fgOpenWindow( SFG_Window* window, const char* title, * XXX A: Not appreciably, but it WILL make it easier to debug. * XXX Try tracing old GLUT and try tracing freeglut. Old GLUT * XXX turns off events that it doesn't need and is a whole lot - * XXX more pleasant to trace. (Hint: Think mouse-motion!) - * XXX - * XXX It may make a difference in networked environments or on - * XXX some very slow systems, but I think that that is secondary - * XXX to making debugging easier. + * XXX more pleasant to trace. (Think mouse-motion! Tons of + * XXX ``bonus'' GUI events stream in.) */ winAttr.event_mask = StructureNotifyMask | SubstructureNotifyMask | ExposureMask | @@ -395,7 +393,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, ); } -/* window->Window.Context = fgStructure.MenuContext->Context ; */ + /* window->Window.Context = fgStructure.MenuContext->Context; */ window->Window.Context = glXCreateContext( fgDisplay.Display, window->Window.VisualInfo, NULL, fgState.ForceDirectContext | fgState.TryDirectContext @@ -1035,7 +1033,7 @@ void FGAPIENTRY glutFullScreen( void ) rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER - ); + ); #endif } }