X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_glutfont_definitions.c;h=454ecb738f152a678dbb13b5841c239c2776721f;hb=3c7c46e5846a39dde8be85c131e69cab1d8cb1ec;hp=87fdf40b4a83daa4311f858e4e159db4e2a37a26;hpb=98ea79ef777bea593a87aef9600ee3d4fda6e110;p=freeglut diff --git a/src/freeglut_glutfont_definitions.c b/src/freeglut_glutfont_definitions.c index 87fdf40..454ecb7 100644 --- a/src/freeglut_glutfont_definitions.c +++ b/src/freeglut_glutfont_definitions.c @@ -40,26 +40,57 @@ * structure to match GLUT. */ +/* + * freeglut_internal.h uses some GL types, but including the GL header portably + * is a bit tricky, so we include freeglut_std.h here, which contains the + * necessary machinery. But this poses another problem, caused by the ugly + * original defintion of the font constants in "classic" GLUT: They are defined + * as void* externally, so we move them temporarily out of the way by AN EXTREME + * CPP HACK. + */ + +#define glutStrokeRoman glutStrokeRomanIGNOREME +#define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME +#define glutBitmap9By15 glutBitmap9By15IGNOREME +#define glutBitmap8By13 glutBitmap8By13IGNOREME +#define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME +#define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME +#define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME +#define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME +#define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME + +#include + +#undef glutStrokeRoman +#undef glutStrokeMonoRoman +#undef glutBitmap9By15 +#undef glutBitmap8By13 +#undef glutBitmapTimesRoman10 +#undef glutBitmapTimesRoman24 +#undef glutBitmapHelvetica10 +#undef glutBitmapHelvetica12 +#undef glutBitmapHelvetica18 + #include "freeglut_internal.h" -#if TARGET_HOST_UNIX_X11 +#if TARGET_HOST_POSIX_X11 struct freeglutStrokeFont { - const char *name ; - int num_chars ; - void *ch ; - float top ; - float bottom ; -}; + const char *name ; + int num_chars ; + void *ch ; + float top ; + float bottom ; +}; struct freeglutBitmapFont -{ - const char *name ; - const int num_chars ; - const int first ; - const void *ch ; -}; +{ + const char *name ; + const int num_chars ; + const int first ; + const void *ch ; +}; struct freeglutStrokeFont glutStrokeRoman ;