Allowing "freeglut" to compile without errors under *nix. Before this, there were...
[freeglut] / src / freeglut_internal.h
index 1cda9e6..f7155d5 100644 (file)
 #    ifdef HAVE_X11_EXTENSIONS_XF86VMODE_H
 #        include <X11/extensions/xf86vmode.h>
 #    endif
+/* If GLX is too old, we will fail during runtime when multisampling
+   is requested, but at least freeglut compiles. */
+#    ifndef GLX_SAMPLE_BUFFERS
+#        define GLX_SAMPLE_BUFFERS 0x80A8
+#    endif
+#    ifndef GLX_SAMPLES
+#        define GLX_SAMPLES 0x80A9
+#    endif
 
 #endif
 
 /* These files should be available on every platform. */
-#include <GL/gl.h>
-#include <GL/glu.h>
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
@@ -302,6 +308,13 @@ struct tagSFG_State
     char            *ProgramName;         /* Name of the invoking program    */
     GLboolean        JoysticksInitialised;  /* Only initialize if application calls for them */
     GLboolean        InputDevsInitialised;  /* Only initialize if application calls for them */
+
+    int              AuxiliaryBufferNumber;  /* Number of auxiliary buffers */
+    int              SampleNumber;         /*  Number of samples per pixel  */
+
+    int              MajorVersion;         /* Major OpenGL context version  */
+    int              MinorVersion;         /* Minor OpenGL context version  */
+    int              ContextFlags;         /* OpenGL context flags          */
 };
 
 /* The structure used by display initialization in freeglut_init.c */
@@ -314,6 +327,8 @@ struct tagSFG_Display
     Window          RootWindow;         /* The screen's root window.         */
     int             Connection;         /* The display's connection number   */
     Atom            DeleteWindow;       /* The window deletion atom          */
+    Atom            State;              /* The state atom                    */
+    Atom            StateFullScreen;    /* The full screen atom              */
 
 #ifdef X_XF86VidModeGetModeLine
     /*
@@ -672,6 +687,18 @@ struct tagSFG_Font
     float           xorig, yorig; /* Relative origin of the character */
 };
 
+#if TARGET_HOST_POSIX_X11
+
+struct freeglutBitmapFont
+{
+  const char *name ;
+  const int num_chars ;
+  const int first ;
+  const void *ch ;
+};
+
+#endif
+
 /* The stroke font structures */
 
 typedef struct tagSFG_StrokeVertex SFG_StrokeVertex;
@@ -899,6 +926,15 @@ void fgListInsert(SFG_List *list, SFG_Node *next, SFG_Node *node);
 void fgError( const char *fmt, ... );
 void fgWarning( const char *fmt, ... );
 
+/*
+ * Check if "hint" is present in "property" for "window".  See freeglut_init.c
+ */
+#if TARGET_HOST_POSIX_X11
+int fgHintPresent(Window window, Atom property, Atom hint);
+#endif
+
+SFG_Proc fghGetProcAddress( const char *procName );
+
 #endif /* FREEGLUT_INTERNAL_H */
 
 /*** END OF FILE ***/