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.
This commit is contained in:
parent
8d62eb4599
commit
b8326b011d
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue