drawing join dots on stroke fonts is now optional (and default off)
[freeglut] / src / fg_state.c
index 9ddfdd9..bb2e8f7 100644 (file)
@@ -44,6 +44,7 @@
 extern int fgPlatformGlutGet ( GLenum eWhat );
 extern int fgPlatformGlutDeviceGet ( GLenum eWhat );
 extern int *fgPlatformGlutGetModeValues(GLenum eWhat, int *size);
+extern SFG_Font* fghFontByID( void* font );
 
 
 /* -- LOCAL DEFINITIONS ---------------------------------------------------- */
@@ -60,9 +61,6 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
 {
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetOption" );
 
-    /*
-     * XXX In chronological code add order.  (WHY in that order?)
-     */
     switch( eWhat )
     {
     case GLUT_INIT_WINDOW_X:
@@ -120,6 +118,10 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
         fgStructure.CurrentWindow->State.VisualizeNormals = value;
       break;
 
+    case GLUT_STROKE_FONT_DRAW_JOIN_DOTS:
+      fgState.StrokeFontDrawJoinDots = value;
+      break;
+
     default:
         fgWarning( "glutSetOption(): missing enum handle %d", eWhat );
         break;
@@ -148,7 +150,6 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
     FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGet" );
 
-    /* XXX In chronological code add order.  (WHY in that order?) */
     switch( eWhat )
     {
     /* Following values are stored in fgState and fgDisplay global structures */
@@ -221,6 +222,9 @@ int FGAPIENTRY glutGet( GLenum eWhat )
         return GL_FALSE;
       return fgStructure.CurrentWindow->State.VisualizeNormals;
 
+    case GLUT_STROKE_FONT_DRAW_JOIN_DOTS:
+        return fgState.StrokeFontDrawJoinDots;
+
     default:
         return fgPlatformGlutGet ( eWhat );
         break;