Fixing the "fghGetProcAddress" bug also noted by Evan Felix in e-mail dated 2/4/12...
[freeglut] / src / Common / freeglut_window.c
index 9b28940..fb17ea6 100644 (file)
@@ -406,7 +406,7 @@ static GLXContext fghCreateNewContext( SFG_Window* window )
 \r
   /* new context creation */\r
   int attributes[9];\r
-  CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fghGetProcAddress( "glXCreateContextAttribsARB" );\r
+  CreateContextAttribsProc createContextAttribs = (CreateContextAttribsProc) fgPlatformGetProcAddress( "glXCreateContextAttribsARB" );\r
  \r
   /* glXCreateContextAttribsARB not found, yet the user has requested the new context creation */\r
   if ( !createContextAttribs && !fghIsLegacyContextRequested() ) {\r
@@ -525,6 +525,13 @@ void fgPlatformSetWindow ( SFG_Window *window )
 }\r
 \r
 \r
+static Bool fghWindowIsVisible( Display *display, XEvent *event, XPointer arg)\r
+{\r
+    Window window = (Window)arg;\r
+    return (event->type == MapNotify) && (event->xmap.window == window);\r
+}\r
+\r
+\r
 /*\r
  * Opens a window. Requires a SFG_Window object created and attached\r
  * to the freeglut structure. OpenGL context is created here.\r
@@ -759,13 +766,6 @@ void fgPlatformCloseWindow( SFG_Window* window )
 }\r
 \r
 \r
-static Bool fghWindowIsVisible( Display *display, XEvent *event, XPointer arg)\r
-{\r
-    Window window = (Window)arg;\r
-    return (event->type == MapNotify) && (event->xmap.window == window);\r
-}\r
-\r
-\r
 \r
 \r
 /*\r