diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-01-03 20:59:52 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-01-03 20:59:56 -0500 |
commit | b8326b011d9b16dcc502507a52bd747a4b709399 (patch) | |
tree | f96317eb5fb05b48e34633b20f07febaf5b1196d /src/glut | |
parent | 8d62eb45997a199e116661e26217b4d44fb9ba1e (diff) |
Fix glut to work with -fvisibility=hidden
The GLUTAPI #define used in the header file to mark the font structs
visible wasn't kicking in because of the #define glutBitmap9By15 XXX
prior to #include <GL/glut.h>. High quality code... worked around by
copying the GLUTAPI specifier to the invidual C files.
Diffstat (limited to 'src/glut')
-rw-r--r-- | src/glut/glx/capturexfont.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_8x13.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_9x15.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_hel10.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_hel12.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_hel18.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_mroman.c | 5 | ||||
-rw-r--r-- | src/glut/glx/glut_roman.c | 5 | ||||
-rw-r--r-- | src/glut/glx/glut_tr10.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glut_tr24.c | 1 | ||||
-rw-r--r-- | src/glut/glx/glutstroke.h | 4 |
11 files changed, 20 insertions, 2 deletions
diff --git a/src/glut/glx/capturexfont.c b/src/glut/glx/capturexfont.c index b99e793056..fd63fb7c49 100644 --- a/src/glut/glx/capturexfont.c +++ b/src/glut/glx/capturexfont.c @@ -321,6 +321,7 @@ captureXFont(Display * dpy, Font font, char *xfont, char *name) } } printf("};\n\n"); + printf("GLUTAPI const BitmapFontRec %s;\n", name); printf("const BitmapFontRec %s = {\n", name); printf("\"%s\",\n", xfont); printf("%d,\n", last - first + 1); diff --git a/src/glut/glx/glut_8x13.c b/src/glut/glx/glut_8x13.c index 843c63d35a..f4e18eb0a4 100644 --- a/src/glut/glx/glut_8x13.c +++ b/src/glut/glx/glut_8x13.c @@ -2064,6 +2064,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmap8By13; const BitmapFontRec glutBitmap8By13 = { "-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", 256, diff --git a/src/glut/glx/glut_9x15.c b/src/glut/glx/glut_9x15.c index 2d5c004e47..7dbec124d0 100644 --- a/src/glut/glx/glut_9x15.c +++ b/src/glut/glx/glut_9x15.c @@ -2066,6 +2066,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmap9By15; const BitmapFontRec glutBitmap9By15 = { "-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", 256, diff --git a/src/glut/glx/glut_hel10.c b/src/glut/glx/glut_hel10.c index 703cef38f2..3de1750ce6 100644 --- a/src/glut/glx/glut_hel10.c +++ b/src/glut/glx/glut_hel10.c @@ -1769,6 +1769,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmapHelvetica10; const BitmapFontRec glutBitmapHelvetica10 = { "-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", 224, diff --git a/src/glut/glx/glut_hel12.c b/src/glut/glx/glut_hel12.c index 68aed8a2bd..e6f1bbb5e2 100644 --- a/src/glut/glx/glut_hel12.c +++ b/src/glut/glx/glut_hel12.c @@ -1779,6 +1779,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmapHelvetica12; const BitmapFontRec glutBitmapHelvetica12 = { "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", 224, diff --git a/src/glut/glx/glut_hel18.c b/src/glut/glx/glut_hel18.c index f0800843e8..3ddcefd642 100644 --- a/src/glut/glx/glut_hel18.c +++ b/src/glut/glx/glut_hel18.c @@ -1888,6 +1888,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmapHelvetica18; const BitmapFontRec glutBitmapHelvetica18 = { "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", 224, diff --git a/src/glut/glx/glut_mroman.c b/src/glut/glx/glut_mroman.c index a29f043b4a..08f879a511 100644 --- a/src/glut/glx/glut_mroman.c +++ b/src/glut/glx/glut_mroman.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutStrokeMonoRoman XXX #include "glutstroke.h" +#undef glutStrokeMonoRoman /* char: 33 '!' */ @@ -2447,5 +2449,6 @@ static const StrokeCharRec chars[] = { { 2, char127, 52.381, 104.762 }, }; -StrokeFontRec glutStrokeMonoRoman = { "Roman", 128, chars, 119.048, -33.3333 }; +GLUTAPI const StrokeFontRec glutStrokeMonoRoman; +const StrokeFontRec glutStrokeMonoRoman = { "Roman", 128, chars, 119.048, -33.3333 }; diff --git a/src/glut/glx/glut_roman.c b/src/glut/glx/glut_roman.c index af2b4ec956..95b9f8160f 100644 --- a/src/glut/glx/glut_roman.c +++ b/src/glut/glx/glut_roman.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutStrokeRoman XXX #include "glutstroke.h" +#undef glutStrokeRoman /* char: 33 '!' */ @@ -2447,5 +2449,6 @@ static const StrokeCharRec chars[] = { { 2, char127, 33.3333, 66.6667 }, }; -StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 }; +GLUTAPI const StrokeFontRec glutStrokeRoman; +const StrokeFontRec glutStrokeRoman = { "Roman", 128, chars, 119.048, -33.3333 }; diff --git a/src/glut/glx/glut_tr10.c b/src/glut/glx/glut_tr10.c index 0fac8070ca..dbf5ebde5e 100644 --- a/src/glut/glx/glut_tr10.c +++ b/src/glut/glx/glut_tr10.c @@ -1768,6 +1768,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmapTimesRoman10; const BitmapFontRec glutBitmapTimesRoman10 = { "-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", 224, diff --git a/src/glut/glx/glut_tr24.c b/src/glut/glx/glut_tr24.c index 22b0e51603..5db9d36e19 100644 --- a/src/glut/glx/glut_tr24.c +++ b/src/glut/glx/glut_tr24.c @@ -2051,6 +2051,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; +GLUTAPI const BitmapFontRec glutBitmapTimesRoman24; const BitmapFontRec glutBitmapTimesRoman24 = { "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", 224, diff --git a/src/glut/glx/glutstroke.h b/src/glut/glx/glutstroke.h index 74b60314aa..d6eac7aa51 100644 --- a/src/glut/glx/glutstroke.h +++ b/src/glut/glx/glutstroke.h @@ -7,6 +7,10 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ +#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building + the GLUT library itself. */ +#include <GL/glut.h> + #if defined(_MSC_VER) #pragma warning (disable:4244) /* disable bogus conversion warnings */ #pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ |