Cleanup to fgSetWindow(). The usual suspects:
authorRichard Rauch <rkr@olib.org>
Fri, 31 Oct 2003 05:34:19 +0000 (05:34 +0000)
committerRichard Rauch <rkr@olib.org>
Fri, 31 Oct 2003 05:34:19 +0000 (05:34 +0000)
 * Removed tabs.
 * Made indentation consistant.
 * Killed off say-nothing-new comments.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@274 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_window.c

index 1014579..9bc2513 100644 (file)
@@ -215,50 +215,32 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
 #endif
 
 /*
- * Sets the OpenGL context and the fgStructure "Current Window" pointer to the window
- * structure passed in.
+ * Sets the OpenGL context and the fgStructure "Current Window" pointer to
+ * the window structure passed in.
  */
 void fgSetWindow ( SFG_Window *window )
 {
 #if TARGET_HOST_UNIX_X11
-  if ( window )
-  {
-    /*
-        * Make the selected window's GLX context the current one
-     */
-    glXMakeCurrent(
-        fgDisplay.Display,
-        window->Window.Handle,
-        window->Window.Context
-    );
-  }
+    if ( window )
+        glXMakeCurrent(
+            fgDisplay.Display,
+            window->Window.Handle,
+            window->Window.Context
+        );
 #elif TARGET_HOST_WIN32
-       /*
-        * Release the previous' context's device context
-        */
-       if( fgStructure.Window != NULL )
-               ReleaseDC( fgStructure.Window->Window.Handle, fgStructure.Window->Window.Device );
-
-  if ( window )
-  {
-       /*
-          * We will care about releasing the device context later
-          */
-       window->Window.Device = GetDC( window->Window.Handle );
-
-       /*
-          * Set the new current context:
-          */
-       wglMakeCurrent( 
-               window->Window.Device, 
-                 window->Window.Context 
+    if( fgStructure.Window )
+        ReleaseDC( fgStructure.Window->Window.Handle,
+                   fgStructure.Window->Window.Device );
+
+    if ( window )
+    {
+        window->Window.Device = GetDC( window->Window.Handle );
+        wglMakeCurrent( 
+            window->Window.Device, 
+            window->Window.Context 
        );
-  }
+    }
 #endif
-
-    /*
-     * Remember that we have changed the current window state
-     */
     fgStructure.Window = window;
 }