Fix for the font binary compatibility problem.
authorChristopher John Purnell <cjp@lost.org.uk>
Fri, 11 Jul 2003 17:50:22 +0000 (17:50 +0000)
committerChristopher John Purnell <cjp@lost.org.uk>
Fri, 11 Jul 2003 17:50:22 +0000 (17:50 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@132 7f0cb862-5218-0410-a997-914c9d46530a

include/GL/glut.h
src/freeglut_font.c

index de16dcf..06ceae8 100644 (file)
     /*
      * I don't really know if it's a good idea... But here it goes:
      */
-    extern void* glutStrokeRoman;
-    extern void* glutStrokeMonoRoman;
-    extern void* glutBitmap9By15;
-    extern void* glutBitmap8By13;
-    extern void* glutBitmapTimesRoman10;
-    extern void* glutBitmapTimesRoman24;
-    extern void* glutBitmapHelvetica10;
-    extern void* glutBitmapHelvetica12;
-    extern void* glutBitmapHelvetica18;
+    extern struct _GLUTstrokeFont glutStrokeRoman;
+    extern struct _GLUTstrokeFont glutStrokeMonoRoman;
+    extern struct _GLUTbitmapFont glutBitmap9By15;
+    extern struct _GLUTbitmapFont glutBitmap8By13;
+    extern struct _GLUTbitmapFont glutBitmapTimesRoman10;
+    extern struct _GLUTbitmapFont glutBitmapTimesRoman24;
+    extern struct _GLUTbitmapFont glutBitmapHelvetica10;
+    extern struct _GLUTbitmapFont glutBitmapHelvetica12;
+    extern struct _GLUTbitmapFont glutBitmapHelvetica18;
 
     /*
      * Those pointers will be used by following definitions:
index 46e2219..3fe559a 100644 (file)
@@ -59,15 +59,30 @@ extern SFG_StrokeFont fgStrokeMonoRoman;
  * This is for GLUT binary compatibility, as suggested by Steve Baker
  */
 #if TARGET_HOST_UNIX_X11
-  void* glutStrokeRoman;
-  void* glutStrokeMonoRoman;
-  void* glutBitmap9By15;
-  void* glutBitmap8By13;
-  void* glutBitmapTimesRoman10;
-  void* glutBitmapTimesRoman24;
-  void* glutBitmapHelvetica10;
-  void* glutBitmapHelvetica12;
-  void* glutBitmapHelvetica18;
+  struct _GLUTstrokeFont {
+    const char *name;
+    int num_chars;
+    void *ch;
+    float top;
+    float bottom;
+  };
+
+  struct _GLUTbitmapFont {
+    const char *name;
+    const int num_chars;
+    const int first;
+    const void *ch;
+  };
+
+  struct _GLUTstrokeFont glutStrokeRoman;
+  struct _GLUTstrokeFont glutStrokeMonoRoman;
+  struct _GLUTbitmapFont glutBitmap9By15;
+  struct _GLUTbitmapFont glutBitmap8By13;
+  struct _GLUTbitmapFont glutBitmapTimesRoman10;
+  struct _GLUTbitmapFont glutBitmapTimesRoman24;
+  struct _GLUTbitmapFont glutBitmapHelvetica10;
+  struct _GLUTbitmapFont glutBitmapHelvetica12;
+  struct _GLUTbitmapFont glutBitmapHelvetica18;
 #endif