X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_state.c;h=458941f7f6e3c77fee4e8fee301ba4ab65c2fccb;hb=75c76b69c97acea662e41c261dc90324d8906825;hp=9ddfdd9186de9116f38fc4d963dfe079050f9081;hpb=75ee380e8ec27aad5c793bb8d966efd927d82cba;p=freeglut diff --git a/src/fg_state.c b/src/fg_state.c index 9ddfdd9..458941f 100644 --- a/src/fg_state.c +++ b/src/fg_state.c @@ -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,18 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value ) fgStructure.CurrentWindow->State.VisualizeNormals = value; break; + case GLUT_MENU_FONT: + { + void* fontID = (void*)value; + SFG_Font* font; + font = fghFontByID( fontID ); + if (!font) + fgWarning("glutSetOption(GLUT_MENU_FONT,...): bitmap font 0x%08x not found. Make sure you're not passing a stroke font. Ignoring...\n",fontID); + else + fgState.MenuFont = fontID; + } + break; + default: fgWarning( "glutSetOption(): missing enum handle %d", eWhat ); break; @@ -148,7 +158,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 */