Hopefully removed all damage done by commits without merge
authorSven Panne <sven.panne@aedion.de>
Wed, 5 Jan 2005 14:28:22 +0000 (14:28 +0000)
committerSven Panne <sven.panne@aedion.de>
Wed, 5 Jan 2005 14:28:22 +0000 (14:28 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@561 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_ext.c
src/freeglut_font.c
src/freeglut_main.c
src/freeglut_state.c
src/freeglut_window.c

index ff13adc..7278b34 100644 (file)
@@ -172,8 +172,10 @@ static struct name_address_pair glut_functions[] =
    { "glutStrokeString", (void *) glutStrokeString },
    { "glutWireRhombicDodecahedron", (void *) glutWireRhombicDodecahedron },
    { "glutSolidRhombicDodecahedron", (void *) glutSolidRhombicDodecahedron },
-   { "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge },
-   { "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge },
+   { "glutWireSierpinskiSponge", (void *) glutWireSierpinskiSponge },
+   { "glutSolidSierpinskiSponge", (void *) glutSolidSierpinskiSponge },
+   { "glutWireCylinder", (void *) glutWireCylinder },
+   { "glutSolidCylinder", (void *) glutSolidCylinder },
    { "glutGetProcAddress", (void *) glutGetProcAddress },
    { "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
    { NULL, NULL }
index 9a99f46..b163f6e 100644 (file)
@@ -153,7 +153,7 @@ void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string )
      * point back to the start of the line and down one line.
      */
     while( ( c = *string++) )
-        if( string[c] == '\n' )
+        if( c == '\n' )
         {
             glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL );
             x = 0.0f;
index d1ba612..4763411 100644 (file)
@@ -487,7 +487,7 @@ static void fghSleepForEvents( void )
         wait.tv_usec = (msec % 1000) * 1000;
         err = select( socket+1, &fdset, NULL, NULL, &wait );
 
-        if( -1 == err )
+        if( ( -1 == err ) && ( errno != EINTR ) )
             fgWarning ( "freeglut select() error: %d", errno );
     }
 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
index 62d4f89..c972713 100644 (file)
@@ -555,8 +555,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
         return fgStructure.Window ? fgStructure.Window->State.IgnoreKeyRepeat : 0;
 
     case GLUT_DEVICE_KEY_REPEAT:
-        /* XXX WARNING: THIS IS A BIG LIE! */
-        return GLUT_KEY_REPEAT_DEFAULT;
+        return fgState.KeyRepeat;
 
     default:
         fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat );
index 3815716..77f2594 100644 (file)
@@ -316,7 +316,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
      */
     winAttr.event_mask        =
         StructureNotifyMask | SubstructureNotifyMask | ExposureMask |
-        ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyRelease |
+        ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask |
         VisibilityChangeMask | EnterWindowMask | LeaveWindowMask |
         PointerMotionMask | ButtonMotionMask;
     winAttr.background_pixmap = None;
@@ -401,12 +401,6 @@ void fgOpenWindow( SFG_Window* window, const char* title,
     }
 #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?
@@ -452,6 +446,12 @@ void fgOpenWindow( SFG_Window* window, const char* title,
     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