diff options
Diffstat (limited to 'src/glut/beos')
-rw-r--r-- | src/glut/beos/Makefile.orig | 102 | ||||
-rw-r--r-- | src/glut/beos/glut_8x13.c (renamed from src/glut/beos/glut_8x13.cpp) | 13 | ||||
-rw-r--r-- | src/glut/beos/glut_9x15.c (renamed from src/glut/beos/glut_9x15.cpp) | 13 | ||||
-rw-r--r-- | src/glut/beos/glut_bitmap.c (renamed from src/glut/beos/glut_bitmap.cpp) | 3 | ||||
-rw-r--r-- | src/glut/beos/glut_bwidth.c (renamed from src/glut/beos/glut_bwidth.cpp) | 11 | ||||
-rw-r--r-- | src/glut/beos/glut_hel10.c (renamed from src/glut/beos/glut_hel10.cpp) | 9 | ||||
-rw-r--r-- | src/glut/beos/glut_hel12.c (renamed from src/glut/beos/glut_hel12.cpp) | 9 | ||||
-rw-r--r-- | src/glut/beos/glut_hel18.c (renamed from src/glut/beos/glut_hel18.cpp) | 9 | ||||
-rw-r--r-- | src/glut/beos/glut_mroman.c (renamed from src/glut/beos/glut_mroman.cpp) | 0 | ||||
-rw-r--r-- | src/glut/beos/glut_roman.c (renamed from src/glut/beos/glut_roman.cpp) | 0 | ||||
-rw-r--r-- | src/glut/beos/glut_shapes.c (renamed from src/glut/beos/glut_shapes.cpp) | 142 | ||||
-rw-r--r-- | src/glut/beos/glut_stroke.c (renamed from src/glut/beos/glut_stroke.cpp) | 3 | ||||
-rw-r--r-- | src/glut/beos/glut_swidth.c (renamed from src/glut/beos/glut_swidth.cpp) | 11 | ||||
-rw-r--r-- | src/glut/beos/glut_teapot.c (renamed from src/glut/beos/glut_teapot.cpp) | 2 | ||||
-rw-r--r-- | src/glut/beos/glut_tr10.c | 1777 | ||||
-rw-r--r-- | src/glut/beos/glut_tr24.c (renamed from src/glut/beos/glut_tr24.cpp) | 9 | ||||
-rw-r--r-- | src/glut/beos/glut_util.c (renamed from src/glut/beos/glut_util.cpp) | 25 | ||||
-rw-r--r-- | src/glut/beos/glut_vidresize.c | 230 |
18 files changed, 2135 insertions, 233 deletions
diff --git a/src/glut/beos/Makefile.orig b/src/glut/beos/Makefile.orig deleted file mode 100644 index 2ea791f737..0000000000 --- a/src/glut/beos/Makefile.orig +++ /dev/null @@ -1,102 +0,0 @@ -## BeOS Generic Makefile v2.0 ## - -## Fill in this file to specify the project being created, and the referenced -## makefile-engine will do all of the hard work for you. This handles both -## Intel and PowerPC builds of the BeOS. - -## Application Specific Settings --------------------------------------------- - -# specify the name of the binary -NAME= libglut.so - -# specify the type of binary -# APP: Application -# SHARED: Shared library or add-on -# STATIC: Static library archive -# DRIVER: Kernel Driver -TYPE= SHARED - -# specify the source files to use -# full paths or paths relative to the makefile can be included -# all files, regardless of directory, will have their object -# files created in the common object directory. -# Note that this means this makefile will not work correctly -# if two source files with the same name (source.c or source.cpp) -# are included from different directories. Also note that spaces -# in folder names do not work well with this makefile. -SRCS= glut_util.cpp glutBlocker.cpp glutInit.cpp glutWindow.cpp \ -glutEvent.cpp glutCallback.cpp glutOverlay.cpp glutGet.cpp glutColor.cpp \ -glutCursor.cpp glutMenu.cpp glutDstr.cpp glut_bitmap.cpp glut_bwidth.cpp \ -glut_8x13.cpp glut_9x15.cpp glut_hel10.cpp glut_hel12.cpp glut_hel18.cpp \ -glut_tr10.cpp glut_tr24.cpp glut_mroman.cpp glut_roman.cpp glut_stroke.cpp \ -glut_swidth.cpp glut_shapes.cpp glut_teapot.cpp beos_x11.cpp - -# specify the resource files to use -# full path or a relative path to the resource file can be used. -RSRCS= - -# specify additional libraries to link against -# there are two acceptable forms of library specifications -# - if your library follows the naming pattern of: -# libXXX.so or libXXX.a you can simply specify XXX -# library: libbe.so entry: be -# -# - if your library does not follow the standard library -# naming scheme you need to specify the path to the library -# and it's name -# library: my_lib.a entry: my_lib.a or path/my_lib.a -LIBS= GL be - -# specify additional paths to directories following the standard -# libXXX.so or libXXX.a naming scheme. You can specify full paths -# or paths relative to the makefile. The paths included may not -# be recursive, so include all of the paths where libraries can -# be found. Directories where source files are found are -# automatically included. -LIBPATHS= - -# additional paths to look for system headers -# thes use the form: #include <header> -# source file directories are NOT auto-included here -SYSTEM_INCLUDE_PATHS = ../../include /boot/develop/headers/be/opengl - -# additional paths to look for local headers -# thes use the form: #include "header" -# source file directories are automatically included -LOCAL_INCLUDE_PATHS = - -# specify the level of optimization that you desire -# NONE, SOME, FULL -OPTIMIZE= FULL - -# specify any preprocessor symbols to be defined. The symbols -# will be set to a value of 1. For example specify DEBUG if you want -# DEBUG=1 to be set when compiling. -DEFINES= - -# specify special warning levels -# if unspecified default warnings will be used -# NONE = supress all warnings -# ALL = enable all warnings -WARNINGS = ALL - -# specify whether image symbols will be created -# so that stack crawls in the debugger are meaningful -# if TRUE symbols will be created -SYMBOLS = - -# specify debug settings -# if TRUE will allow application to be run from -# a source-level debugger -DEBUGGER = - -# specify additional compiler flags for all files -COMPILER_FLAGS = - -# specify additional linker flags -LINKER_FLAGS = - - -## include the makefile-engine -include /boot/develop/etc/makefile-engine - diff --git a/src/glut/beos/glut_8x13.cpp b/src/glut/beos/glut_8x13.c index f0df89dddd..843c63d35a 100644 --- a/src/glut/beos/glut_8x13.cpp +++ b/src/glut/beos/glut_8x13.c @@ -1,9 +1,11 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmap8By13 XXX #include "glutbitmap.h" +#undef glutBitmap8By13 -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -13,7 +15,7 @@ static const BitmapCharRec ch0 = {1,1,0,0,8,ch0data}; static const BitmapCharRec ch0 = {0,0,0,0,8,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -23,7 +25,7 @@ static const BitmapCharRec ch32 = {1,1,0,0,8,ch32data}; static const BitmapCharRec ch32 = {0,0,0,0,8,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -33,7 +35,7 @@ static const BitmapCharRec ch127 = {1,1,0,0,8,ch127data}; static const BitmapCharRec ch127 = {0,0,0,0,8,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -2062,8 +2064,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmap8By13 = { +const BitmapFontRec glutBitmap8By13 = { "-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", 256, 0, diff --git a/src/glut/beos/glut_9x15.cpp b/src/glut/beos/glut_9x15.c index 52b379fda8..2d5c004e47 100644 --- a/src/glut/beos/glut_9x15.cpp +++ b/src/glut/beos/glut_9x15.c @@ -1,9 +1,11 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmap9By15 XXX #include "glutbitmap.h" +#undef glutBitmap9By15 -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -13,7 +15,7 @@ static const BitmapCharRec ch0 = {1,1,0,0,9,ch0data}; static const BitmapCharRec ch0 = {0,0,0,0,9,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -23,7 +25,7 @@ static const BitmapCharRec ch32 = {1,1,0,0,9,ch32data}; static const BitmapCharRec ch32 = {0,0,0,0,9,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -33,7 +35,7 @@ static const BitmapCharRec ch127 = {1,1,0,0,9,ch127data}; static const BitmapCharRec ch127 = {0,0,0,0,9,0}; #endif -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -2064,8 +2066,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmap9By15 = { +const BitmapFontRec glutBitmap9By15 = { "-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1", 256, 0, diff --git a/src/glut/beos/glut_bitmap.cpp b/src/glut/beos/glut_bitmap.c index 874a05e0b0..f1afdd7a04 100644 --- a/src/glut/beos/glut_bitmap.cpp +++ b/src/glut/beos/glut_bitmap.c @@ -5,7 +5,6 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ -#include <GL/glut.h> #include "glutint.h" #include "glutbitmap.h" @@ -17,7 +16,7 @@ glutBitmapCharacter(GLUTbitmapFont font, int c) GLint swapbytes, lsbfirst, rowlength; GLint skiprows, skippixels, alignment; -#if defined(WIN32) +#if defined(_WIN32) fontinfo = (BitmapFontPtr) __glutFont(font); #else fontinfo = (BitmapFontPtr) font; diff --git a/src/glut/beos/glut_bwidth.cpp b/src/glut/beos/glut_bwidth.c index 711dfa569e..bee5e8827e 100644 --- a/src/glut/beos/glut_bwidth.cpp +++ b/src/glut/beos/glut_bwidth.c @@ -5,7 +5,6 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ -#include <GL/glut.h> #include "glutint.h" #include "glutbitmap.h" @@ -16,7 +15,7 @@ glutBitmapWidth(GLUTbitmapFont font, int c) BitmapFontPtr fontinfo; const BitmapCharRec *ch; -#if defined(WIN32) +#ifdef _WIN32 fontinfo = (BitmapFontPtr) __glutFont(font); #else fontinfo = (BitmapFontPtr) font; @@ -26,19 +25,19 @@ glutBitmapWidth(GLUTbitmapFont font, int c) return 0; ch = fontinfo->ch[c - fontinfo->first]; if (ch) - return (int)ch->advance; + return ch->advance; else return 0; } int APIENTRY -glutBitmapLength(GLUTbitmapFont font, const char *string) +glutBitmapLength(GLUTbitmapFont font, const unsigned char *string) { int c, length; BitmapFontPtr fontinfo; const BitmapCharRec *ch; -#ifdef WIN32 +#ifdef _WIN32 fontinfo = (BitmapFontPtr) __glutFont(font); #else fontinfo = (BitmapFontPtr) font; @@ -50,7 +49,7 @@ glutBitmapLength(GLUTbitmapFont font, const char *string) if (c >= fontinfo->first && c < fontinfo->first + fontinfo->num_chars) { ch = fontinfo->ch[c - fontinfo->first]; if (ch) - length += (int)ch->advance; + length += ch->advance; } } return length; diff --git a/src/glut/beos/glut_hel10.cpp b/src/glut/beos/glut_hel10.c index 7ed306c1c0..703cef38f2 100644 --- a/src/glut/beos/glut_hel10.cpp +++ b/src/glut/beos/glut_hel10.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmapHelvetica10 XXX #include "glutbitmap.h" +#undef glutBitmapHelvetica10 /* char: 0xff */ @@ -765,7 +767,7 @@ static const BitmapCharRec ch161 = {1,8,-1,2,3,ch161data}; /* char: 0xa0 */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1530,7 +1532,7 @@ static const BitmapCharRec ch33 = {1,8,-1,0,3,ch33data}; /* char: 0x20 ' ' */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1767,8 +1769,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmapHelvetica10 = { +const BitmapFontRec glutBitmapHelvetica10 = { "-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1", 224, 32, diff --git a/src/glut/beos/glut_hel12.cpp b/src/glut/beos/glut_hel12.c index 3866503f5a..68aed8a2bd 100644 --- a/src/glut/beos/glut_hel12.cpp +++ b/src/glut/beos/glut_hel12.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmapHelvetica12 XXX #include "glutbitmap.h" +#undef glutBitmapHelvetica12 /* char: 0xff */ @@ -772,7 +774,7 @@ static const BitmapCharRec ch161 = {1,10,-1,3,3,ch161data}; /* char: 0xa0 */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1540,7 +1542,7 @@ static const BitmapCharRec ch33 = {1,9,-1,0,3,ch33data}; /* char: 0x20 ' ' */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1777,8 +1779,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmapHelvetica12 = { +const BitmapFontRec glutBitmapHelvetica12 = { "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", 224, 32, diff --git a/src/glut/beos/glut_hel18.cpp b/src/glut/beos/glut_hel18.c index 00d509d57a..f0800843e8 100644 --- a/src/glut/beos/glut_hel18.cpp +++ b/src/glut/beos/glut_hel18.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmapHelvetica18 XXX #include "glutbitmap.h" +#undef glutBitmapHelvetica18 /* char: 0xff */ @@ -839,7 +841,7 @@ static const BitmapCharRec ch161 = {2,14,-2,4,6,ch161data}; /* char: 0xa0 */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1649,7 +1651,7 @@ static const BitmapCharRec ch33 = {2,14,-2,0,6,ch33data}; /* char: 0x20 ' ' */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1886,8 +1888,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmapHelvetica18 = { +const BitmapFontRec glutBitmapHelvetica18 = { "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1", 224, 32, diff --git a/src/glut/beos/glut_mroman.cpp b/src/glut/beos/glut_mroman.c index a29f043b4a..a29f043b4a 100644 --- a/src/glut/beos/glut_mroman.cpp +++ b/src/glut/beos/glut_mroman.c diff --git a/src/glut/beos/glut_roman.cpp b/src/glut/beos/glut_roman.c index af2b4ec956..af2b4ec956 100644 --- a/src/glut/beos/glut_roman.cpp +++ b/src/glut/beos/glut_roman.c diff --git a/src/glut/beos/glut_shapes.cpp b/src/glut/beos/glut_shapes.c index 2249639f0c..ce5bebb2be 100644 --- a/src/glut/beos/glut_shapes.cpp +++ b/src/glut/beos/glut_shapes.c @@ -1,5 +1,5 @@ -/* Copyright (c) Mark J. Kilgard, 1994. */ +/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ /** (c) Copyright 1993, Silicon Graphics, Inc. @@ -45,12 +45,11 @@ OpenGL(TM) is a trademark of Silicon Graphics, Inc. */ #include <math.h> -#include <GL/glut.h> #include "glutint.h" /* Some <math.h> files do not define M_PI... */ #ifndef M_PI -#define M_PI 3.14159265 +#define M_PI 3.14159265358979323846 #endif static GLUquadricObj *quadObj; @@ -66,7 +65,7 @@ initQuadObj(void) } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks) { QUAD_OBJ_INIT(); @@ -78,7 +77,7 @@ glutWireSphere(GLdouble radius, GLint slices, GLint stacks) gluSphere(quadObj, radius, slices, stacks); } -void APIENTRY +void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) { QUAD_OBJ_INIT(); @@ -90,7 +89,7 @@ glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) gluSphere(quadObj, radius, slices, stacks); } -void APIENTRY +void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks) { @@ -103,7 +102,7 @@ glutWireCone(GLdouble base, GLdouble height, gluCylinder(quadObj, base, 0.0, height, slices, stacks); } -void APIENTRY +void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks) { @@ -149,7 +148,7 @@ drawBox(GLfloat size, GLenum type) v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; - for (i = 0; i < 6; i++) { + for (i = 5; i >= 0; i--) { glBegin(type); glNormal3fv(&n[i][0]); glVertex3fv(&v[faces[i][0]][0]); @@ -161,13 +160,13 @@ drawBox(GLfloat size, GLenum type) } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireCube(GLdouble size) { drawBox(size, GL_LINE_LOOP); } -void APIENTRY +void APIENTRY glutSolidCube(GLdouble size) { drawBox(size, GL_QUADS); @@ -176,81 +175,62 @@ glutSolidCube(GLdouble size) /* ENDCENTRY */ static void -doughnut(GLfloat r, GLfloat R, GLint nsides, - GLint rings, GLenum type) +doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings) { int i, j; - GLfloat theta, phi, theta1, phi1; - GLfloat p0[03], p1[3], p2[3], p3[3]; - GLfloat n0[3], n1[3], n2[3], n3[3]; - - for (i = 0; i < rings; i++) { - theta = (GLfloat) i *2.0 * M_PI / rings; - theta1 = (GLfloat) (i + 1) * 2.0 * M_PI / rings; - for (j = 0; j < nsides; j++) { - phi = (GLfloat) j *2.0 * M_PI / nsides; - phi1 = (GLfloat) (j + 1) * 2.0 * M_PI / nsides; - - p0[0] = cos(theta) * (R + r * cos(phi)); - p0[1] = -sin(theta) * (R + r * cos(phi)); - p0[2] = r * sin(phi); - - p1[0] = cos(theta1) * (R + r * cos(phi)); - p1[1] = -sin(theta1) * (R + r * cos(phi)); - p1[2] = r * sin(phi); - - p2[0] = cos(theta1) * (R + r * cos(phi1)); - p2[1] = -sin(theta1) * (R + r * cos(phi1)); - p2[2] = r * sin(phi1); - - p3[0] = cos(theta) * (R + r * cos(phi1)); - p3[1] = -sin(theta) * (R + r * cos(phi1)); - p3[2] = r * sin(phi1); - - n0[0] = cos(theta) * (cos(phi)); - n0[1] = -sin(theta) * (cos(phi)); - n0[2] = sin(phi); - - n1[0] = cos(theta1) * (cos(phi)); - n1[1] = -sin(theta1) * (cos(phi)); - n1[2] = sin(phi); - - n2[0] = cos(theta1) * (cos(phi1)); - n2[1] = -sin(theta1) * (cos(phi1)); - n2[2] = sin(phi1); - - n3[0] = cos(theta) * (cos(phi1)); - n3[1] = -sin(theta) * (cos(phi1)); - n3[2] = sin(phi1); - - glBegin(type); - glNormal3fv(n3); - glVertex3fv(p3); - glNormal3fv(n2); - glVertex3fv(p2); - glNormal3fv(n1); - glVertex3fv(p1); - glNormal3fv(n0); - glVertex3fv(p0); - glEnd(); + GLfloat theta, phi, theta1; + GLfloat cosTheta, sinTheta; + GLfloat cosTheta1, sinTheta1; + GLfloat ringDelta, sideDelta; + + ringDelta = 2.0 * M_PI / rings; + sideDelta = 2.0 * M_PI / nsides; + + theta = 0.0; + cosTheta = 1.0; + sinTheta = 0.0; + for (i = rings - 1; i >= 0; i--) { + theta1 = theta + ringDelta; + cosTheta1 = cos(theta1); + sinTheta1 = sin(theta1); + glBegin(GL_QUAD_STRIP); + phi = 0.0; + for (j = nsides; j >= 0; j--) { + GLfloat cosPhi, sinPhi, dist; + + phi += sideDelta; + cosPhi = cos(phi); + sinPhi = sin(phi); + dist = R + r * cosPhi; + + glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi); + glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi); + glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi); + glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi); } + glEnd(); + theta = theta1; + cosTheta = cosTheta1; + sinTheta = sinTheta1; } } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint nsides, GLint rings) { - doughnut(innerRadius, outerRadius, - nsides, rings, GL_LINE_LOOP); + glPushAttrib(GL_POLYGON_BIT); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + doughnut(innerRadius, outerRadius, nsides, rings); + glPopAttrib(); } -void APIENTRY +void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint nsides, GLint rings) { - doughnut(innerRadius, outerRadius, nsides, rings, GL_QUADS); + doughnut(innerRadius, outerRadius, nsides, rings); } /* ENDCENTRY */ @@ -369,13 +349,13 @@ dodecahedron(GLenum type) } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireDodecahedron(void) { dodecahedron(GL_LINE_LOOP); } -void APIENTRY +void APIENTRY glutSolidDodecahedron(void) { dodecahedron(GL_TRIANGLE_FAN); @@ -480,19 +460,19 @@ octahedron(GLenum shadeType) { int i; - for (i = 0; i < 8; i++) { + for (i = 7; i >= 0; i--) { drawtriangle(i, odata, ondex, shadeType); } } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireOctahedron(void) { octahedron(GL_LINE_LOOP); } -void APIENTRY +void APIENTRY glutSolidOctahedron(void) { octahedron(GL_TRIANGLES); @@ -551,19 +531,19 @@ icosahedron(GLenum shadeType) { int i; - for (i = 0; i < 20; i++) { + for (i = 19; i >= 0; i--) { drawtriangle(i, idata, index, shadeType); } } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireIcosahedron(void) { icosahedron(GL_LINE_LOOP); } -void APIENTRY +void APIENTRY glutSolidIcosahedron(void) { icosahedron(GL_TRIANGLES); @@ -596,18 +576,18 @@ tetrahedron(GLenum shadeType) { int i; - for (i = 0; i < 4; i++) + for (i = 3; i >= 0; i--) drawtriangle(i, tdata, tndex, shadeType); } /* CENTRY */ -void APIENTRY +void APIENTRY glutWireTetrahedron(void) { tetrahedron(GL_LINE_LOOP); } -void APIENTRY +void APIENTRY glutSolidTetrahedron(void) { tetrahedron(GL_TRIANGLES); diff --git a/src/glut/beos/glut_stroke.cpp b/src/glut/beos/glut_stroke.c index c9231ebbd5..2fe408be1a 100644 --- a/src/glut/beos/glut_stroke.cpp +++ b/src/glut/beos/glut_stroke.c @@ -5,7 +5,6 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ -#include <GL/glut.h> #include "glutint.h" #include "glutstroke.h" @@ -19,7 +18,7 @@ glutStrokeCharacter(GLUTstrokeFont font, int c) int i, j; -#if defined(WIN32) +#if defined(_WIN32) fontinfo = (StrokeFontPtr) __glutFont(font); #else fontinfo = (StrokeFontPtr) font; diff --git a/src/glut/beos/glut_swidth.cpp b/src/glut/beos/glut_swidth.c index 228c8fc255..e1b7374575 100644 --- a/src/glut/beos/glut_swidth.cpp +++ b/src/glut/beos/glut_swidth.c @@ -5,7 +5,6 @@ and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. */ -#include <GL/glut.h> #include "glutint.h" #include "glutstroke.h" @@ -16,7 +15,7 @@ glutStrokeWidth(GLUTstrokeFont font, int c) StrokeFontPtr fontinfo; const StrokeCharRec *ch; -#if defined(WIN32) +#if defined(_WIN32) fontinfo = (StrokeFontPtr) __glutFont(font); #else fontinfo = (StrokeFontPtr) font; @@ -26,19 +25,19 @@ glutStrokeWidth(GLUTstrokeFont font, int c) return 0; ch = &(fontinfo->ch[c]); if (ch) - return (int)ch->right; + return ch->right; else return 0; } int APIENTRY -glutStrokeLength(GLUTstrokeFont font, const char *string) +glutStrokeLength(GLUTstrokeFont font, const unsigned char *string) { int c, length; StrokeFontPtr fontinfo; const StrokeCharRec *ch; -#if defined(WIN32) +#if defined(_WIN32) fontinfo = (StrokeFontPtr) __glutFont(font); #else fontinfo = (StrokeFontPtr) font; @@ -50,7 +49,7 @@ glutStrokeLength(GLUTstrokeFont font, const char *string) if (c >= 0 && c < fontinfo->num_chars) { ch = &(fontinfo->ch[c]); if (ch) - length += (int)ch->right; + length += ch->right; } } return length; diff --git a/src/glut/beos/glut_teapot.cpp b/src/glut/beos/glut_teapot.c index 63e63e4487..3c9bdc1ab7 100644 --- a/src/glut/beos/glut_teapot.cpp +++ b/src/glut/beos/glut_teapot.c @@ -44,7 +44,7 @@ Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA OpenGL(TM) is a trademark of Silicon Graphics, Inc. */ -#include <GL/glut.h> +#include "glutint.h" /* Rim, body, lid, and bottom data must be reflected in x and y; handle and spout data across the y axis only. */ diff --git a/src/glut/beos/glut_tr10.c b/src/glut/beos/glut_tr10.c new file mode 100644 index 0000000000..0fac8070ca --- /dev/null +++ b/src/glut/beos/glut_tr10.c @@ -0,0 +1,1777 @@ + +/* GENERATED FILE -- DO NOT MODIFY */ + +#define glutBitmapTimesRoman10 XXX +#include "glutbitmap.h" +#undef glutBitmapTimesRoman10 + +/* char: 0xff */ + +static const GLubyte ch255data[] = { +0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0xa0, +}; + +static const BitmapCharRec ch255 = {5,9,0,2,5,ch255data}; + +/* char: 0xfe */ + +static const GLubyte ch254data[] = { +0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, +}; + +static const BitmapCharRec ch254 = {4,9,0,2,5,ch254data}; + +/* char: 0xfd */ + +static const GLubyte ch253data[] = { +0x80,0xc0,0x40,0x60,0xa0,0x90,0xb8,0x0,0x20,0x10, +}; + +static const BitmapCharRec ch253 = {5,10,0,2,5,ch253data}; + +/* char: 0xfc */ + +static const GLubyte ch252data[] = { +0x68,0x90,0x90,0x90,0x90,0x0,0x50, +}; + +static const BitmapCharRec ch252 = {5,7,0,0,5,ch252data}; + +/* char: 0xfb */ + +static const GLubyte ch251data[] = { +0x68,0x90,0x90,0x90,0x90,0x0,0x50,0x20, +}; + +static const BitmapCharRec ch251 = {5,8,0,0,5,ch251data}; + +/* char: 0xfa */ + +static const GLubyte ch250data[] = { +0x68,0x90,0x90,0x90,0x90,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch250 = {5,8,0,0,5,ch250data}; + +/* char: 0xf9 */ + +static const GLubyte ch249data[] = { +0x68,0x90,0x90,0x90,0x90,0x0,0x20,0x40, +}; + +static const BitmapCharRec ch249 = {5,8,0,0,5,ch249data}; + +/* char: 0xf8 */ + +static const GLubyte ch248data[] = { +0x80,0x70,0x48,0x48,0x48,0x38,0x4, +}; + +static const BitmapCharRec ch248 = {6,7,1,1,5,ch248data}; + +/* char: 0xf7 */ + +static const GLubyte ch247data[] = { +0x20,0x0,0xf8,0x0,0x20, +}; + +static const BitmapCharRec ch247 = {5,5,0,0,6,ch247data}; + +/* char: 0xf6 */ + +static const GLubyte ch246data[] = { +0x60,0x90,0x90,0x90,0x60,0x0,0xa0, +}; + +static const BitmapCharRec ch246 = {4,7,0,0,5,ch246data}; + +/* char: 0xf5 */ + +static const GLubyte ch245data[] = { +0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x50, +}; + +static const BitmapCharRec ch245 = {4,8,0,0,5,ch245data}; + +/* char: 0xf4 */ + +static const GLubyte ch244data[] = { +0x60,0x90,0x90,0x90,0x60,0x0,0xa0,0x40, +}; + +static const BitmapCharRec ch244 = {4,8,0,0,5,ch244data}; + +/* char: 0xf3 */ + +static const GLubyte ch243data[] = { +0x60,0x90,0x90,0x90,0x60,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch243 = {4,8,0,0,5,ch243data}; + +/* char: 0xf2 */ + +static const GLubyte ch242data[] = { +0x60,0x90,0x90,0x90,0x60,0x0,0x20,0x40, +}; + +static const BitmapCharRec ch242 = {4,8,0,0,5,ch242data}; + +/* char: 0xf1 */ + +static const GLubyte ch241data[] = { +0xd8,0x90,0x90,0x90,0xe0,0x0,0xa0,0x50, +}; + +static const BitmapCharRec ch241 = {5,8,0,0,5,ch241data}; + +/* char: 0xf0 */ + +static const GLubyte ch240data[] = { +0x60,0x90,0x90,0x90,0x70,0xa0,0x70,0x40, +}; + +static const BitmapCharRec ch240 = {4,8,0,0,5,ch240data}; + +/* char: 0xef */ + +static const GLubyte ch239data[] = { +0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0, +}; + +static const BitmapCharRec ch239 = {3,7,0,0,4,ch239data}; + +/* char: 0xee */ + +static const GLubyte ch238data[] = { +0xe0,0x40,0x40,0x40,0xc0,0x0,0xa0,0x40, +}; + +static const BitmapCharRec ch238 = {3,8,0,0,4,ch238data}; + +/* char: 0xed */ + +static const GLubyte ch237data[] = { +0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch237 = {3,8,0,0,4,ch237data}; + +/* char: 0xec */ + +static const GLubyte ch236data[] = { +0xe0,0x40,0x40,0x40,0xc0,0x0,0x40,0x80, +}; + +static const BitmapCharRec ch236 = {3,8,0,0,4,ch236data}; + +/* char: 0xeb */ + +static const GLubyte ch235data[] = { +0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0, +}; + +static const BitmapCharRec ch235 = {3,7,0,0,4,ch235data}; + +/* char: 0xea */ + +static const GLubyte ch234data[] = { +0x60,0x80,0xc0,0xa0,0x60,0x0,0xa0,0x40, +}; + +static const BitmapCharRec ch234 = {3,8,0,0,4,ch234data}; + +/* char: 0xe9 */ + +static const GLubyte ch233data[] = { +0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch233 = {3,8,0,0,4,ch233data}; + +/* char: 0xe8 */ + +static const GLubyte ch232data[] = { +0x60,0x80,0xc0,0xa0,0x60,0x0,0x40,0x80, +}; + +static const BitmapCharRec ch232 = {3,8,0,0,4,ch232data}; + +/* char: 0xe7 */ + +static const GLubyte ch231data[] = { +0xc0,0x20,0x40,0x60,0x80,0x80,0x80,0x60, +}; + +static const BitmapCharRec ch231 = {3,8,0,3,4,ch231data}; + +/* char: 0xe6 */ + +static const GLubyte ch230data[] = { +0xd8,0xa0,0x70,0x28,0xd8, +}; + +static const BitmapCharRec ch230 = {5,5,0,0,6,ch230data}; + +/* char: 0xe5 */ + +static const GLubyte ch229data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x40,0xa0,0x40, +}; + +static const BitmapCharRec ch229 = {3,8,0,0,4,ch229data}; + +/* char: 0xe4 */ + +static const GLubyte ch228data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0, +}; + +static const BitmapCharRec ch228 = {3,7,0,0,4,ch228data}; + +/* char: 0xe3 */ + +static const GLubyte ch227data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x50, +}; + +static const BitmapCharRec ch227 = {4,8,0,0,4,ch227data}; + +/* char: 0xe2 */ + +static const GLubyte ch226data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x0,0xa0,0x40, +}; + +static const BitmapCharRec ch226 = {3,8,0,0,4,ch226data}; + +/* char: 0xe1 */ + +static const GLubyte ch225data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch225 = {3,8,0,0,4,ch225data}; + +/* char: 0xe0 */ + +static const GLubyte ch224data[] = { +0xe0,0xa0,0x60,0x20,0xc0,0x0,0x40,0x80, +}; + +static const BitmapCharRec ch224 = {3,8,0,0,4,ch224data}; + +/* char: 0xdf */ + +static const GLubyte ch223data[] = { +0xe0,0x50,0x50,0x60,0x50,0x50,0x20, +}; + +static const BitmapCharRec ch223 = {4,7,0,0,5,ch223data}; + +/* char: 0xde */ + +static const GLubyte ch222data[] = { +0xe0,0x40,0x70,0x48,0x70,0x40,0xe0, +}; + +static const BitmapCharRec ch222 = {5,7,0,0,6,ch222data}; + +/* char: 0xdd */ + +static const GLubyte ch221data[] = { +0x38,0x10,0x10,0x28,0x28,0x44,0xee,0x0,0x10,0x8, +}; + +static const BitmapCharRec ch221 = {7,10,0,0,8,ch221data}; + +/* char: 0xdc */ + +static const GLubyte ch220data[] = { +0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28, +}; + +static const BitmapCharRec ch220 = {7,9,0,0,8,ch220data}; + +/* char: 0xdb */ + +static const GLubyte ch219data[] = { +0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x28,0x10, +}; + +static const BitmapCharRec ch219 = {7,10,0,0,8,ch219data}; + +/* char: 0xda */ + +static const GLubyte ch218data[] = { +0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x8, +}; + +static const BitmapCharRec ch218 = {7,10,0,0,8,ch218data}; + +/* char: 0xd9 */ + +static const GLubyte ch217data[] = { +0x38,0x6c,0x44,0x44,0x44,0x44,0xee,0x0,0x10,0x20, +}; + +static const BitmapCharRec ch217 = {7,10,0,0,8,ch217data}; + +/* char: 0xd8 */ + +static const GLubyte ch216data[] = { +0x80,0x7c,0x66,0x52,0x52,0x4a,0x66,0x3e,0x1, +}; + +static const BitmapCharRec ch216 = {8,9,0,1,8,ch216data}; + +/* char: 0xd7 */ + +static const GLubyte ch215data[] = { +0x88,0x50,0x20,0x50,0x88, +}; + +static const BitmapCharRec ch215 = {5,5,0,0,6,ch215data}; + +/* char: 0xd6 */ + +static const GLubyte ch214data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50, +}; + +static const BitmapCharRec ch214 = {6,9,0,0,7,ch214data}; + +/* char: 0xd5 */ + +static const GLubyte ch213data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x28, +}; + +static const BitmapCharRec ch213 = {6,10,0,0,7,ch213data}; + +/* char: 0xd4 */ + +static const GLubyte ch212data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x50,0x20, +}; + +static const BitmapCharRec ch212 = {6,10,0,0,7,ch212data}; + +/* char: 0xd3 */ + +static const GLubyte ch211data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x10,0x8, +}; + +static const BitmapCharRec ch211 = {6,10,0,0,7,ch211data}; + +/* char: 0xd2 */ + +static const GLubyte ch210data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78,0x0,0x20,0x40, +}; + +static const BitmapCharRec ch210 = {6,10,0,0,7,ch210data}; + +/* char: 0xd1 */ + +static const GLubyte ch209data[] = { +0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee,0x0,0x50,0x28, +}; + +static const BitmapCharRec ch209 = {7,10,0,0,8,ch209data}; + +/* char: 0xd0 */ + +static const GLubyte ch208data[] = { +0xf8,0x4c,0x44,0xe4,0x44,0x4c,0xf8, +}; + +static const BitmapCharRec ch208 = {6,7,0,0,7,ch208data}; + +/* char: 0xcf */ + +static const GLubyte ch207data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0, +}; + +static const BitmapCharRec ch207 = {3,9,0,0,4,ch207data}; + +/* char: 0xce */ + +static const GLubyte ch206data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0xa0,0x40, +}; + +static const BitmapCharRec ch206 = {3,10,0,0,4,ch206data}; + +/* char: 0xcd */ + +static const GLubyte ch205data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x20, +}; + +static const BitmapCharRec ch205 = {3,10,0,0,4,ch205data}; + +/* char: 0xcc */ + +static const GLubyte ch204data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xe0,0x0,0x40,0x80, +}; + +static const BitmapCharRec ch204 = {3,10,0,0,4,ch204data}; + +/* char: 0xcb */ + +static const GLubyte ch203data[] = { +0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50, +}; + +static const BitmapCharRec ch203 = {5,9,0,0,6,ch203data}; + +/* char: 0xca */ + +static const GLubyte ch202data[] = { +0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x50,0x20, +}; + +static const BitmapCharRec ch202 = {5,10,0,0,6,ch202data}; + +/* char: 0xc9 */ + +static const GLubyte ch201data[] = { +0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x10, +}; + +static const BitmapCharRec ch201 = {5,10,0,0,6,ch201data}; + +/* char: 0xc8 */ + +static const GLubyte ch200data[] = { +0xf8,0x48,0x40,0x70,0x40,0x48,0xf8,0x0,0x20,0x40, +}; + +static const BitmapCharRec ch200 = {5,10,0,0,6,ch200data}; + +/* char: 0xc7 */ + +static const GLubyte ch199data[] = { +0x60,0x10,0x20,0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, +}; + +static const BitmapCharRec ch199 = {6,10,0,3,7,ch199data}; + +/* char: 0xc6 */ + +static const GLubyte ch198data[] = { +0xef,0x49,0x78,0x2e,0x28,0x39,0x1f, +}; + +static const BitmapCharRec ch198 = {8,7,0,0,9,ch198data}; + +/* char: 0xc5 */ + +static const GLubyte ch197data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x10,0x28,0x10, +}; + +static const BitmapCharRec ch197 = {7,10,0,0,8,ch197data}; + +/* char: 0xc4 */ + +static const GLubyte ch196data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28, +}; + +static const BitmapCharRec ch196 = {7,9,0,0,8,ch196data}; + +/* char: 0xc3 */ + +static const GLubyte ch195data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x14, +}; + +static const BitmapCharRec ch195 = {7,10,0,0,8,ch195data}; + +/* char: 0xc2 */ + +static const GLubyte ch194data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x28,0x10, +}; + +static const BitmapCharRec ch194 = {7,10,0,0,8,ch194data}; + +/* char: 0xc1 */ + +static const GLubyte ch193data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x8, +}; + +static const BitmapCharRec ch193 = {7,10,0,0,8,ch193data}; + +/* char: 0xc0 */ + +static const GLubyte ch192data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10,0x0,0x10,0x20, +}; + +static const BitmapCharRec ch192 = {7,10,0,0,8,ch192data}; + +/* char: 0xbf */ + +static const GLubyte ch191data[] = { +0xe0,0xa0,0x80,0x40,0x40,0x0,0x40, +}; + +static const BitmapCharRec ch191 = {3,7,0,2,4,ch191data}; + +/* char: 0xbe */ + +static const GLubyte ch190data[] = { +0x44,0x3e,0x2c,0xd4,0x28,0x48,0xe4, +}; + +static const BitmapCharRec ch190 = {7,7,0,0,8,ch190data}; + +/* char: 0xbd */ + +static const GLubyte ch189data[] = { +0x4e,0x24,0x2a,0xf6,0x48,0xc8,0x44, +}; + +static const BitmapCharRec ch189 = {7,7,0,0,8,ch189data}; + +/* char: 0xbc */ + +static const GLubyte ch188data[] = { +0x44,0x3e,0x2c,0xf4,0x48,0xc8,0x44, +}; + +static const BitmapCharRec ch188 = {7,7,0,0,8,ch188data}; + +/* char: 0xbb */ + +static const GLubyte ch187data[] = { +0xa0,0x50,0x50,0xa0, +}; + +static const BitmapCharRec ch187 = {4,4,0,-1,5,ch187data}; + +/* char: 0xba */ + +static const GLubyte ch186data[] = { +0xe0,0x0,0x40,0xa0,0x40, +}; + +static const BitmapCharRec ch186 = {3,5,0,-2,4,ch186data}; + +/* char: 0xb9 */ + +static const GLubyte ch185data[] = { +0xe0,0x40,0xc0,0x40, +}; + +static const BitmapCharRec ch185 = {3,4,0,-3,3,ch185data}; + +/* char: 0xb8 */ + +static const GLubyte ch184data[] = { +0xc0,0x20,0x40, +}; + +static const BitmapCharRec ch184 = {3,3,0,3,4,ch184data}; + +/* char: 0xb7 */ + +static const GLubyte ch183data[] = { +0x80, +}; + +static const BitmapCharRec ch183 = {1,1,0,-2,2,ch183data}; + +/* char: 0xb6 */ + +static const GLubyte ch182data[] = { +0x28,0x28,0x28,0x28,0x68,0xe8,0xe8,0xe8,0x7c, +}; + +static const BitmapCharRec ch182 = {6,9,0,2,6,ch182data}; + +/* char: 0xb5 */ + +static const GLubyte ch181data[] = { +0x80,0x80,0xe8,0x90,0x90,0x90,0x90, +}; + +static const BitmapCharRec ch181 = {5,7,0,2,5,ch181data}; + +/* char: 0xb4 */ + +static const GLubyte ch180data[] = { +0x80,0x40, +}; + +static const BitmapCharRec ch180 = {2,2,0,-5,3,ch180data}; + +/* char: 0xb3 */ + +static const GLubyte ch179data[] = { +0xc0,0x20,0x40,0xe0, +}; + +static const BitmapCharRec ch179 = {3,4,0,-3,3,ch179data}; + +/* char: 0xb2 */ + +static const GLubyte ch178data[] = { +0xe0,0x40,0xa0,0x60, +}; + +static const BitmapCharRec ch178 = {3,4,0,-3,3,ch178data}; + +/* char: 0xb1 */ + +static const GLubyte ch177data[] = { +0xf8,0x0,0x20,0x20,0xf8,0x20,0x20, +}; + +static const BitmapCharRec ch177 = {5,7,0,0,6,ch177data}; + +/* char: 0xb0 */ + +static const GLubyte ch176data[] = { +0x60,0x90,0x90,0x60, +}; + +static const BitmapCharRec ch176 = {4,4,0,-3,4,ch176data}; + +/* char: 0xaf */ + +static const GLubyte ch175data[] = { +0xe0, +}; + +static const BitmapCharRec ch175 = {3,1,0,-6,4,ch175data}; + +/* char: 0xae */ + +static const GLubyte ch174data[] = { +0x38,0x44,0xaa,0xb2,0xba,0x44,0x38, +}; + +static const BitmapCharRec ch174 = {7,7,-1,0,9,ch174data}; + +/* char: 0xad */ + +static const GLubyte ch173data[] = { +0xe0, +}; + +static const BitmapCharRec ch173 = {3,1,0,-2,4,ch173data}; + +/* char: 0xac */ + +static const GLubyte ch172data[] = { +0x8,0x8,0xf8, +}; + +static const BitmapCharRec ch172 = {5,3,-1,-1,7,ch172data}; + +/* char: 0xab */ + +static const GLubyte ch171data[] = { +0x50,0xa0,0xa0,0x50, +}; + +static const BitmapCharRec ch171 = {4,4,0,-1,5,ch171data}; + +/* char: 0xaa */ + +static const GLubyte ch170data[] = { +0xe0,0x0,0xa0,0x20,0xc0, +}; + +static const BitmapCharRec ch170 = {3,5,0,-2,4,ch170data}; + +/* char: 0xa9 */ + +static const GLubyte ch169data[] = { +0x38,0x44,0x9a,0xa2,0x9a,0x44,0x38, +}; + +static const BitmapCharRec ch169 = {7,7,-1,0,9,ch169data}; + +/* char: 0xa8 */ + +static const GLubyte ch168data[] = { +0xa0, +}; + +static const BitmapCharRec ch168 = {3,1,-1,-6,5,ch168data}; + +/* char: 0xa7 */ + +static const GLubyte ch167data[] = { +0xe0,0x90,0x20,0x50,0x90,0xa0,0x40,0x90,0x70, +}; + +static const BitmapCharRec ch167 = {4,9,0,1,5,ch167data}; + +/* char: 0xa6 */ + +static const GLubyte ch166data[] = { +0x80,0x80,0x80,0x0,0x80,0x80,0x80, +}; + +static const BitmapCharRec ch166 = {1,7,0,0,2,ch166data}; + +/* char: 0xa5 */ + +static const GLubyte ch165data[] = { +0x70,0x20,0xf8,0x20,0xd8,0x50,0x88, +}; + +static const BitmapCharRec ch165 = {5,7,0,0,5,ch165data}; + +/* char: 0xa4 */ + +static const GLubyte ch164data[] = { +0x88,0x70,0x50,0x50,0x70,0x88, +}; + +static const BitmapCharRec ch164 = {5,6,0,-1,5,ch164data}; + +/* char: 0xa3 */ + +static const GLubyte ch163data[] = { +0xf0,0xc8,0x40,0xe0,0x40,0x50,0x30, +}; + +static const BitmapCharRec ch163 = {5,7,0,0,5,ch163data}; + +/* char: 0xa2 */ + +static const GLubyte ch162data[] = { +0x80,0xe0,0x90,0x80,0x90,0x70,0x10, +}; + +static const BitmapCharRec ch162 = {4,7,0,1,5,ch162data}; + +/* char: 0xa1 */ + +static const GLubyte ch161data[] = { +0x80,0x80,0x80,0x80,0x80,0x0,0x80, +}; + +static const BitmapCharRec ch161 = {1,7,-1,2,3,ch161data}; + +/* char: 0xa0 */ + +#ifdef _WIN32 +/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with + a height or width of zero does not advance the raster position + as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ +static const GLubyte ch160data[] = { 0x0 }; +static const BitmapCharRec ch160 = {1,1,0,0,2,ch160data}; +#else +static const BitmapCharRec ch160 = {0,0,0,0,2,0}; +#endif + +/* char: 0x7e '~' */ + +static const GLubyte ch126data[] = { +0x98,0x64, +}; + +static const BitmapCharRec ch126 = {6,2,0,-2,7,ch126data}; + +/* char: 0x7d '}' */ + +static const GLubyte ch125data[] = { +0x80,0x40,0x40,0x40,0x20,0x40,0x40,0x40,0x80, +}; + +static const BitmapCharRec ch125 = {3,9,0,2,4,ch125data}; + +/* char: 0x7c '|' */ + +static const GLubyte ch124data[] = { +0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, +}; + +static const BitmapCharRec ch124 = {1,9,0,2,2,ch124data}; + +/* char: 0x7b '{' */ + +static const GLubyte ch123data[] = { +0x20,0x40,0x40,0x40,0x80,0x40,0x40,0x40,0x20, +}; + +static const BitmapCharRec ch123 = {3,9,0,2,4,ch123data}; + +/* char: 0x7a 'z' */ + +static const GLubyte ch122data[] = { +0xf0,0x90,0x40,0x20,0xf0, +}; + +static const BitmapCharRec ch122 = {4,5,0,0,5,ch122data}; + +/* char: 0x79 'y' */ + +static const GLubyte ch121data[] = { +0x40,0x40,0x20,0x30,0x50,0x48,0xdc, +}; + +static const BitmapCharRec ch121 = {6,7,1,2,5,ch121data}; + +/* char: 0x78 'x' */ + +static const GLubyte ch120data[] = { +0xd8,0x50,0x20,0x50,0xd8, +}; + +static const BitmapCharRec ch120 = {5,5,0,0,6,ch120data}; + +/* char: 0x77 'w' */ + +static const GLubyte ch119data[] = { +0x28,0x6c,0x54,0x92,0xdb, +}; + +static const BitmapCharRec ch119 = {8,5,0,0,8,ch119data}; + +/* char: 0x76 'v' */ + +static const GLubyte ch118data[] = { +0x20,0x60,0x50,0x90,0xd8, +}; + +static const BitmapCharRec ch118 = {5,5,0,0,5,ch118data}; + +/* char: 0x75 'u' */ + +static const GLubyte ch117data[] = { +0x68,0x90,0x90,0x90,0x90, +}; + +static const BitmapCharRec ch117 = {5,5,0,0,5,ch117data}; + +/* char: 0x74 't' */ + +static const GLubyte ch116data[] = { +0x30,0x40,0x40,0x40,0xe0,0x40, +}; + +static const BitmapCharRec ch116 = {4,6,0,0,4,ch116data}; + +/* char: 0x73 's' */ + +static const GLubyte ch115data[] = { +0xe0,0x20,0x60,0x80,0xe0, +}; + +static const BitmapCharRec ch115 = {3,5,0,0,4,ch115data}; + +/* char: 0x72 'r' */ + +static const GLubyte ch114data[] = { +0xe0,0x40,0x40,0x60,0xa0, +}; + +static const BitmapCharRec ch114 = {3,5,0,0,4,ch114data}; + +/* char: 0x71 'q' */ + +static const GLubyte ch113data[] = { +0x38,0x10,0x70,0x90,0x90,0x90,0x70, +}; + +static const BitmapCharRec ch113 = {5,7,0,2,5,ch113data}; + +/* char: 0x70 'p' */ + +static const GLubyte ch112data[] = { +0xc0,0x80,0xe0,0x90,0x90,0x90,0xe0, +}; + +static const BitmapCharRec ch112 = {4,7,0,2,5,ch112data}; + +/* char: 0x6f 'o' */ + +static const GLubyte ch111data[] = { +0x60,0x90,0x90,0x90,0x60, +}; + +static const BitmapCharRec ch111 = {4,5,0,0,5,ch111data}; + +/* char: 0x6e 'n' */ + +static const GLubyte ch110data[] = { +0xd8,0x90,0x90,0x90,0xe0, +}; + +static const BitmapCharRec ch110 = {5,5,0,0,5,ch110data}; + +/* char: 0x6d 'm' */ + +static const GLubyte ch109data[] = { +0xdb,0x92,0x92,0x92,0xec, +}; + +static const BitmapCharRec ch109 = {8,5,0,0,8,ch109data}; + +/* char: 0x6c 'l' */ + +static const GLubyte ch108data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xc0, +}; + +static const BitmapCharRec ch108 = {3,7,0,0,4,ch108data}; + +/* char: 0x6b 'k' */ + +static const GLubyte ch107data[] = { +0x98,0x90,0xe0,0xa0,0x90,0x80,0x80, +}; + +static const BitmapCharRec ch107 = {5,7,0,0,5,ch107data}; + +/* char: 0x6a 'j' */ + +static const GLubyte ch106data[] = { +0x80,0x40,0x40,0x40,0x40,0x40,0xc0,0x0,0x40, +}; + +static const BitmapCharRec ch106 = {2,9,0,2,3,ch106data}; + +/* char: 0x69 'i' */ + +static const GLubyte ch105data[] = { +0x40,0x40,0x40,0x40,0xc0,0x0,0x40, +}; + +static const BitmapCharRec ch105 = {2,7,0,0,3,ch105data}; + +/* char: 0x68 'h' */ + +static const GLubyte ch104data[] = { +0xd8,0x90,0x90,0x90,0xe0,0x80,0x80, +}; + +static const BitmapCharRec ch104 = {5,7,0,0,5,ch104data}; + +/* char: 0x67 'g' */ + +static const GLubyte ch103data[] = { +0xe0,0x90,0x60,0x40,0xa0,0xa0,0x70, +}; + +static const BitmapCharRec ch103 = {4,7,0,2,5,ch103data}; + +/* char: 0x66 'f' */ + +static const GLubyte ch102data[] = { +0xe0,0x40,0x40,0x40,0xe0,0x40,0x30, +}; + +static const BitmapCharRec ch102 = {4,7,0,0,4,ch102data}; + +/* char: 0x65 'e' */ + +static const GLubyte ch101data[] = { +0x60,0x80,0xc0,0xa0,0x60, +}; + +static const BitmapCharRec ch101 = {3,5,0,0,4,ch101data}; + +/* char: 0x64 'd' */ + +static const GLubyte ch100data[] = { +0x68,0x90,0x90,0x90,0x70,0x10,0x30, +}; + +static const BitmapCharRec ch100 = {5,7,0,0,5,ch100data}; + +/* char: 0x63 'c' */ + +static const GLubyte ch99data[] = { +0x60,0x80,0x80,0x80,0x60, +}; + +static const BitmapCharRec ch99 = {3,5,0,0,4,ch99data}; + +/* char: 0x62 'b' */ + +static const GLubyte ch98data[] = { +0xe0,0x90,0x90,0x90,0xe0,0x80,0x80, +}; + +static const BitmapCharRec ch98 = {4,7,0,0,5,ch98data}; + +/* char: 0x61 'a' */ + +static const GLubyte ch97data[] = { +0xe0,0xa0,0x60,0x20,0xc0, +}; + +static const BitmapCharRec ch97 = {3,5,0,0,4,ch97data}; + +/* char: 0x60 '`' */ + +static const GLubyte ch96data[] = { +0xc0,0x80, +}; + +static const BitmapCharRec ch96 = {2,2,0,-5,3,ch96data}; + +/* char: 0x5f '_' */ + +static const GLubyte ch95data[] = { +0xf8, +}; + +static const BitmapCharRec ch95 = {5,1,0,3,5,ch95data}; + +/* char: 0x5e '^' */ + +static const GLubyte ch94data[] = { +0xa0,0xa0,0x40, +}; + +static const BitmapCharRec ch94 = {3,3,-1,-4,5,ch94data}; + +/* char: 0x5d ']' */ + +static const GLubyte ch93data[] = { +0xc0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0, +}; + +static const BitmapCharRec ch93 = {2,9,0,2,3,ch93data}; + +/* char: 0x5c '\' */ + +static const GLubyte ch92data[] = { +0x20,0x20,0x40,0x40,0x40,0x80,0x80, +}; + +static const BitmapCharRec ch92 = {3,7,0,0,3,ch92data}; + +/* char: 0x5b '[' */ + +static const GLubyte ch91data[] = { +0xc0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0, +}; + +static const BitmapCharRec ch91 = {2,9,0,2,3,ch91data}; + +/* char: 0x5a 'Z' */ + +static const GLubyte ch90data[] = { +0xf8,0x88,0x40,0x20,0x10,0x88,0xf8, +}; + +static const BitmapCharRec ch90 = {5,7,0,0,6,ch90data}; + +/* char: 0x59 'Y' */ + +static const GLubyte ch89data[] = { +0x38,0x10,0x10,0x28,0x28,0x44,0xee, +}; + +static const BitmapCharRec ch89 = {7,7,0,0,8,ch89data}; + +/* char: 0x58 'X' */ + +static const GLubyte ch88data[] = { +0xee,0x44,0x28,0x10,0x28,0x44,0xee, +}; + +static const BitmapCharRec ch88 = {7,7,0,0,8,ch88data}; + +/* char: 0x57 'W' */ + +static const GLubyte ch87data[] = { +0x22,0x0,0x22,0x0,0x55,0x0,0x55,0x0,0xc9,0x80,0x88,0x80,0xdd,0xc0, +}; + +static const BitmapCharRec ch87 = {10,7,0,0,10,ch87data}; + +/* char: 0x56 'V' */ + +static const GLubyte ch86data[] = { +0x10,0x10,0x28,0x28,0x6c,0x44,0xee, +}; + +static const BitmapCharRec ch86 = {7,7,0,0,8,ch86data}; + +/* char: 0x55 'U' */ + +static const GLubyte ch85data[] = { +0x38,0x6c,0x44,0x44,0x44,0x44,0xee, +}; + +static const BitmapCharRec ch85 = {7,7,0,0,8,ch85data}; + +/* char: 0x54 'T' */ + +static const GLubyte ch84data[] = { +0x70,0x20,0x20,0x20,0x20,0xa8,0xf8, +}; + +static const BitmapCharRec ch84 = {5,7,0,0,6,ch84data}; + +/* char: 0x53 'S' */ + +static const GLubyte ch83data[] = { +0xe0,0x90,0x10,0x60,0xc0,0x90,0x70, +}; + +static const BitmapCharRec ch83 = {4,7,0,0,5,ch83data}; + +/* char: 0x52 'R' */ + +static const GLubyte ch82data[] = { +0xec,0x48,0x50,0x70,0x48,0x48,0xf0, +}; + +static const BitmapCharRec ch82 = {6,7,0,0,7,ch82data}; + +/* char: 0x51 'Q' */ + +static const GLubyte ch81data[] = { +0xc,0x18,0x70,0xcc,0x84,0x84,0x84,0xcc,0x78, +}; + +static const BitmapCharRec ch81 = {6,9,0,2,7,ch81data}; + +/* char: 0x50 'P' */ + +static const GLubyte ch80data[] = { +0xe0,0x40,0x40,0x70,0x48,0x48,0xf0, +}; + +static const BitmapCharRec ch80 = {5,7,0,0,6,ch80data}; + +/* char: 0x4f 'O' */ + +static const GLubyte ch79data[] = { +0x78,0xcc,0x84,0x84,0x84,0xcc,0x78, +}; + +static const BitmapCharRec ch79 = {6,7,0,0,7,ch79data}; + +/* char: 0x4e 'N' */ + +static const GLubyte ch78data[] = { +0xe4,0x4c,0x4c,0x54,0x54,0x64,0xee, +}; + +static const BitmapCharRec ch78 = {7,7,0,0,8,ch78data}; + +/* char: 0x4d 'M' */ + +static const GLubyte ch77data[] = { +0xeb,0x80,0x49,0x0,0x55,0x0,0x55,0x0,0x63,0x0,0x63,0x0,0xe3,0x80, +}; + +static const BitmapCharRec ch77 = {9,7,0,0,10,ch77data}; + +/* char: 0x4c 'L' */ + +static const GLubyte ch76data[] = { +0xf8,0x48,0x40,0x40,0x40,0x40,0xe0, +}; + +static const BitmapCharRec ch76 = {5,7,0,0,6,ch76data}; + +/* char: 0x4b 'K' */ + +static const GLubyte ch75data[] = { +0xec,0x48,0x50,0x60,0x50,0x48,0xec, +}; + +static const BitmapCharRec ch75 = {6,7,0,0,7,ch75data}; + +/* char: 0x4a 'J' */ + +static const GLubyte ch74data[] = { +0xc0,0xa0,0x20,0x20,0x20,0x20,0x70, +}; + +static const BitmapCharRec ch74 = {4,7,0,0,4,ch74data}; + +/* char: 0x49 'I' */ + +static const GLubyte ch73data[] = { +0xe0,0x40,0x40,0x40,0x40,0x40,0xe0, +}; + +static const BitmapCharRec ch73 = {3,7,0,0,4,ch73data}; + +/* char: 0x48 'H' */ + +static const GLubyte ch72data[] = { +0xee,0x44,0x44,0x7c,0x44,0x44,0xee, +}; + +static const BitmapCharRec ch72 = {7,7,0,0,8,ch72data}; + +/* char: 0x47 'G' */ + +static const GLubyte ch71data[] = { +0x78,0xc4,0x84,0x9c,0x80,0xc4,0x7c, +}; + +static const BitmapCharRec ch71 = {6,7,0,0,7,ch71data}; + +/* char: 0x46 'F' */ + +static const GLubyte ch70data[] = { +0xe0,0x40,0x40,0x70,0x40,0x48,0xf8, +}; + +static const BitmapCharRec ch70 = {5,7,0,0,6,ch70data}; + +/* char: 0x45 'E' */ + +static const GLubyte ch69data[] = { +0xf8,0x48,0x40,0x70,0x40,0x48,0xf8, +}; + +static const BitmapCharRec ch69 = {5,7,0,0,6,ch69data}; + +/* char: 0x44 'D' */ + +static const GLubyte ch68data[] = { +0xf8,0x4c,0x44,0x44,0x44,0x4c,0xf8, +}; + +static const BitmapCharRec ch68 = {6,7,0,0,7,ch68data}; + +/* char: 0x43 'C' */ + +static const GLubyte ch67data[] = { +0x78,0xc4,0x80,0x80,0x80,0xc4,0x7c, +}; + +static const BitmapCharRec ch67 = {6,7,0,0,7,ch67data}; + +/* char: 0x42 'B' */ + +static const GLubyte ch66data[] = { +0xf0,0x48,0x48,0x70,0x48,0x48,0xf0, +}; + +static const BitmapCharRec ch66 = {5,7,0,0,6,ch66data}; + +/* char: 0x41 'A' */ + +static const GLubyte ch65data[] = { +0xee,0x44,0x7c,0x28,0x28,0x38,0x10, +}; + +static const BitmapCharRec ch65 = {7,7,0,0,8,ch65data}; + +/* char: 0x40 '@' */ + +static const GLubyte ch64data[] = { +0x3e,0x40,0x92,0xad,0xa5,0xa5,0x9d,0x42,0x3c, +}; + +static const BitmapCharRec ch64 = {8,9,0,2,9,ch64data}; + +/* char: 0x3f '?' */ + +static const GLubyte ch63data[] = { +0x40,0x0,0x40,0x40,0x20,0xa0,0xe0, +}; + +static const BitmapCharRec ch63 = {3,7,0,0,4,ch63data}; + +/* char: 0x3e '>' */ + +static const GLubyte ch62data[] = { +0x80,0x40,0x20,0x40,0x80, +}; + +static const BitmapCharRec ch62 = {3,5,0,0,5,ch62data}; + +/* char: 0x3d '=' */ + +static const GLubyte ch61data[] = { +0xf8,0x0,0xf8, +}; + +static const BitmapCharRec ch61 = {5,3,0,-1,6,ch61data}; + +/* char: 0x3c '<' */ + +static const GLubyte ch60data[] = { +0x20,0x40,0x80,0x40,0x20, +}; + +static const BitmapCharRec ch60 = {3,5,-1,0,5,ch60data}; + +/* char: 0x3b ';' */ + +static const GLubyte ch59data[] = { +0x80,0x80,0x80,0x0,0x0,0x0,0x80, +}; + +static const BitmapCharRec ch59 = {1,7,-1,2,3,ch59data}; + +/* char: 0x3a ':' */ + +static const GLubyte ch58data[] = { +0x80,0x0,0x0,0x0,0x80, +}; + +static const BitmapCharRec ch58 = {1,5,-1,0,3,ch58data}; + +/* char: 0x39 '9' */ + +static const GLubyte ch57data[] = { +0xc0,0x20,0x70,0x90,0x90,0x90,0x60, +}; + +static const BitmapCharRec ch57 = {4,7,0,0,5,ch57data}; + +/* char: 0x38 '8' */ + +static const GLubyte ch56data[] = { +0x60,0x90,0x90,0x60,0x90,0x90,0x60, +}; + +static const BitmapCharRec ch56 = {4,7,0,0,5,ch56data}; + +/* char: 0x37 '7' */ + +static const GLubyte ch55data[] = { +0x40,0x40,0x40,0x20,0x20,0x90,0xf0, +}; + +static const BitmapCharRec ch55 = {4,7,0,0,5,ch55data}; + +/* char: 0x36 '6' */ + +static const GLubyte ch54data[] = { +0x60,0x90,0x90,0x90,0xe0,0x40,0x30, +}; + +static const BitmapCharRec ch54 = {4,7,0,0,5,ch54data}; + +/* char: 0x35 '5' */ + +static const GLubyte ch53data[] = { +0xe0,0x90,0x10,0x10,0xe0,0x40,0x70, +}; + +static const BitmapCharRec ch53 = {4,7,0,0,5,ch53data}; + +/* char: 0x34 '4' */ + +static const GLubyte ch52data[] = { +0x10,0x10,0xf8,0x90,0x50,0x30,0x10, +}; + +static const BitmapCharRec ch52 = {5,7,0,0,5,ch52data}; + +/* char: 0x33 '3' */ + +static const GLubyte ch51data[] = { +0xe0,0x10,0x10,0x60,0x10,0x90,0x60, +}; + +static const BitmapCharRec ch51 = {4,7,0,0,5,ch51data}; + +/* char: 0x32 '2' */ + +static const GLubyte ch50data[] = { +0xf0,0x40,0x20,0x20,0x10,0x90,0x60, +}; + +static const BitmapCharRec ch50 = {4,7,0,0,5,ch50data}; + +/* char: 0x31 '1' */ + +static const GLubyte ch49data[] = { +0xe0,0x40,0x40,0x40,0x40,0xc0,0x40, +}; + +static const BitmapCharRec ch49 = {3,7,-1,0,5,ch49data}; + +/* char: 0x30 '0' */ + +static const GLubyte ch48data[] = { +0x60,0x90,0x90,0x90,0x90,0x90,0x60, +}; + +static const BitmapCharRec ch48 = {4,7,0,0,5,ch48data}; + +/* char: 0x2f '/' */ + +static const GLubyte ch47data[] = { +0x80,0x80,0x40,0x40,0x40,0x20,0x20, +}; + +static const BitmapCharRec ch47 = {3,7,0,0,3,ch47data}; + +/* char: 0x2e '.' */ + +static const GLubyte ch46data[] = { +0x80, +}; + +static const BitmapCharRec ch46 = {1,1,-1,0,3,ch46data}; + +/* char: 0x2d '-' */ + +static const GLubyte ch45data[] = { +0xf0, +}; + +static const BitmapCharRec ch45 = {4,1,-1,-2,7,ch45data}; + +/* char: 0x2c ',' */ + +static const GLubyte ch44data[] = { +0x80,0x80,0x80, +}; + +static const BitmapCharRec ch44 = {1,3,-1,2,3,ch44data}; + +/* char: 0x2b '+' */ + +static const GLubyte ch43data[] = { +0x20,0x20,0xf8,0x20,0x20, +}; + +static const BitmapCharRec ch43 = {5,5,0,0,6,ch43data}; + +/* char: 0x2a '*' */ + +static const GLubyte ch42data[] = { +0xa0,0x40,0xa0, +}; + +static const BitmapCharRec ch42 = {3,3,0,-4,5,ch42data}; + +/* char: 0x29 ')' */ + +static const GLubyte ch41data[] = { +0x80,0x40,0x40,0x20,0x20,0x20,0x40,0x40,0x80, +}; + +static const BitmapCharRec ch41 = {3,9,0,2,4,ch41data}; + +/* char: 0x28 '(' */ + +static const GLubyte ch40data[] = { +0x20,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x20, +}; + +static const BitmapCharRec ch40 = {3,9,0,2,4,ch40data}; + +/* char: 0x27 ''' */ + +static const GLubyte ch39data[] = { +0x40,0xc0, +}; + +static const BitmapCharRec ch39 = {2,2,0,-5,3,ch39data}; + +/* char: 0x26 '&' */ + +static const GLubyte ch38data[] = { +0x76,0x8d,0x98,0x74,0x6e,0x50,0x30, +}; + +static const BitmapCharRec ch38 = {8,7,0,0,8,ch38data}; + +/* char: 0x25 '%' */ + +static const GLubyte ch37data[] = { +0x44,0x2a,0x2a,0x56,0xa8,0xa4,0x7e, +}; + +static const BitmapCharRec ch37 = {7,7,0,0,8,ch37data}; + +/* char: 0x24 '$' */ + +static const GLubyte ch36data[] = { +0x20,0xe0,0x90,0x10,0x60,0x80,0x90,0x70,0x20, +}; + +static const BitmapCharRec ch36 = {4,9,0,1,5,ch36data}; + +/* char: 0x23 '#' */ + +static const GLubyte ch35data[] = { +0x50,0x50,0xf8,0x50,0xf8,0x50,0x50, +}; + +static const BitmapCharRec ch35 = {5,7,0,0,5,ch35data}; + +/* char: 0x22 '"' */ + +static const GLubyte ch34data[] = { +0xa0,0xa0, +}; + +static const BitmapCharRec ch34 = {3,2,0,-5,4,ch34data}; + +/* char: 0x21 '!' */ + +static const GLubyte ch33data[] = { +0x80,0x0,0x80,0x80,0x80,0x80,0x80, +}; + +static const BitmapCharRec ch33 = {1,7,-1,0,3,ch33data}; + +/* char: 0x20 ' ' */ + +#ifdef _WIN32 +/* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with + a height or width of zero does not advance the raster position + as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ +static const GLubyte ch32data[] = { 0x0 }; +static const BitmapCharRec ch32 = {1,1,0,0,2,ch32data}; +#else +static const BitmapCharRec ch32 = {0,0,0,0,2,0}; +#endif + +static const BitmapCharRec * const chars[] = { +&ch32, +&ch33, +&ch34, +&ch35, +&ch36, +&ch37, +&ch38, +&ch39, +&ch40, +&ch41, +&ch42, +&ch43, +&ch44, +&ch45, +&ch46, +&ch47, +&ch48, +&ch49, +&ch50, +&ch51, +&ch52, +&ch53, +&ch54, +&ch55, +&ch56, +&ch57, +&ch58, +&ch59, +&ch60, +&ch61, +&ch62, +&ch63, +&ch64, +&ch65, +&ch66, +&ch67, +&ch68, +&ch69, +&ch70, +&ch71, +&ch72, +&ch73, +&ch74, +&ch75, +&ch76, +&ch77, +&ch78, +&ch79, +&ch80, +&ch81, +&ch82, +&ch83, +&ch84, +&ch85, +&ch86, +&ch87, +&ch88, +&ch89, +&ch90, +&ch91, +&ch92, +&ch93, +&ch94, +&ch95, +&ch96, +&ch97, +&ch98, +&ch99, +&ch100, +&ch101, +&ch102, +&ch103, +&ch104, +&ch105, +&ch106, +&ch107, +&ch108, +&ch109, +&ch110, +&ch111, +&ch112, +&ch113, +&ch114, +&ch115, +&ch116, +&ch117, +&ch118, +&ch119, +&ch120, +&ch121, +&ch122, +&ch123, +&ch124, +&ch125, +&ch126, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +&ch160, +&ch161, +&ch162, +&ch163, +&ch164, +&ch165, +&ch166, +&ch167, +&ch168, +&ch169, +&ch170, +&ch171, +&ch172, +&ch173, +&ch174, +&ch175, +&ch176, +&ch177, +&ch178, +&ch179, +&ch180, +&ch181, +&ch182, +&ch183, +&ch184, +&ch185, +&ch186, +&ch187, +&ch188, +&ch189, +&ch190, +&ch191, +&ch192, +&ch193, +&ch194, +&ch195, +&ch196, +&ch197, +&ch198, +&ch199, +&ch200, +&ch201, +&ch202, +&ch203, +&ch204, +&ch205, +&ch206, +&ch207, +&ch208, +&ch209, +&ch210, +&ch211, +&ch212, +&ch213, +&ch214, +&ch215, +&ch216, +&ch217, +&ch218, +&ch219, +&ch220, +&ch221, +&ch222, +&ch223, +&ch224, +&ch225, +&ch226, +&ch227, +&ch228, +&ch229, +&ch230, +&ch231, +&ch232, +&ch233, +&ch234, +&ch235, +&ch236, +&ch237, +&ch238, +&ch239, +&ch240, +&ch241, +&ch242, +&ch243, +&ch244, +&ch245, +&ch246, +&ch247, +&ch248, +&ch249, +&ch250, +&ch251, +&ch252, +&ch253, +&ch254, +&ch255, +}; + +const BitmapFontRec glutBitmapTimesRoman10 = { +"-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1", +224, +32, +chars +}; + diff --git a/src/glut/beos/glut_tr24.cpp b/src/glut/beos/glut_tr24.c index 5ae5d413c2..22b0e51603 100644 --- a/src/glut/beos/glut_tr24.cpp +++ b/src/glut/beos/glut_tr24.c @@ -1,7 +1,9 @@ /* GENERATED FILE -- DO NOT MODIFY */ +#define glutBitmapTimesRoman24 XXX #include "glutbitmap.h" +#undef glutBitmapTimesRoman24 /* char: 0xff */ @@ -913,7 +915,7 @@ static const BitmapCharRec ch161 = {2,17,-4,5,8,ch161data}; /* char: 0xa0 */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -1812,7 +1814,7 @@ static const BitmapCharRec ch33 = {2,17,-3,0,8,ch33data}; /* char: 0x20 ' ' */ -#ifdef WIN32 +#ifdef _WIN32 /* XXX Work around Microsoft OpenGL 1.1 bug where glBitmap with a height or width of zero does not advance the raster position as specified by OpenGL. (Cosmo OpenGL does not have this bug.) */ @@ -2049,8 +2051,7 @@ static const BitmapCharRec * const chars[] = { &ch255, }; -// jeh: removed const so mwld can export structure to shared lib -BitmapFontRec glutBitmapTimesRoman24 = { +const BitmapFontRec glutBitmapTimesRoman24 = { "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1", 224, 32, diff --git a/src/glut/beos/glut_util.cpp b/src/glut/beos/glut_util.c index 97e3115832..29e79513a3 100644 --- a/src/glut/beos/glut_util.cpp +++ b/src/glut/beos/glut_util.c @@ -7,11 +7,26 @@ #include <stdlib.h> #include <stdarg.h> +#include <string.h> #include <stdio.h> -#include <GL/glut.h> #include "glutint.h" -#include "glutState.h" + +/* strdup is actually not a standard ANSI C or POSIX routine + so implement a private one for GLUT. OpenVMS does not have a + strdup; Linux's standard libc doesn't declare strdup by default + (unless BSD or SVID interfaces are requested). */ +char * +__glutStrdup(const char *string) +{ + char *copy; + + copy = (char*) malloc(strlen(string) + 1); + if (copy == NULL) + return NULL; + strcpy(copy, string); + return copy; +} void __glutWarning(char *format,...) @@ -20,7 +35,7 @@ __glutWarning(char *format,...) va_start(args, format); fprintf(stderr, "GLUT: Warning in %s: ", - gState.programName ? gState.programName : "(unamed)"); + __glutProgramName ? __glutProgramName : "(unamed)"); vfprintf(stderr, format, args); va_end(args); putc('\n', stderr); @@ -44,7 +59,7 @@ __glutFatalError(char *format,...) va_start(args, format); fprintf(stderr, "GLUT: Fatal Error in %s: ", - gState.programName ? gState.programName : "(unamed)"); + __glutProgramName ? __glutProgramName : "(unamed)"); vfprintf(stderr, format, args); va_end(args); putc('\n', stderr); @@ -58,7 +73,7 @@ __glutFatalUsage(char *format,...) va_start(args, format); fprintf(stderr, "GLUT: Fatal API Usage in %s: ", - gState.programName ? gState.programName : "(unamed)"); + __glutProgramName ? __glutProgramName : "(unamed)"); vfprintf(stderr, format, args); va_end(args); putc('\n', stderr); diff --git a/src/glut/beos/glut_vidresize.c b/src/glut/beos/glut_vidresize.c new file mode 100644 index 0000000000..a9d9e632f5 --- /dev/null +++ b/src/glut/beos/glut_vidresize.c @@ -0,0 +1,230 @@ + +/* Copyright (c) Mark J. Kilgard, 1996. */ + +/* This program is freely distributable without licensing fees + and is provided without guarantee or warrantee expressed or + implied. This program is -not- in the public domain. */ + +#include <stdlib.h> + +#if !defined(_WIN32) && !defined(__BEOS__) +#include <GL/glx.h> +#endif + +#ifdef __sgi +#include <dlfcn.h> +#endif + +#include "glutint.h" + +/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers + support the video resize extension, but failed to define + GLX_SGIX_video_resize. */ +#ifdef GLX_SYNC_FRAME_SGIX +#define GLX_SGIX_video_resize 1 +#endif + +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) +static int canVideoResize = -1; +static int videoResizeChannel; +#else +static int canVideoResize = 0; +#endif +static int videoResizeInUse = 0; +static int dx = -1, dy = -1, dw = -1, dh = -1; + +/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a + bug where programs seg-fault when they attempt video + resizing from an indirect OpenGL context (either local or + over a network). */ + +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + +static volatile int errorCaught; + +/* ARGSUSED */ +static +catchXSGIvcErrors(Display * dpy, XErrorEvent * event) +{ + errorCaught = 1; + return 0; +} +#endif + +/* CENTRY */ +int APIENTRY +glutVideoResizeGet(GLenum param) +{ +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (canVideoResize < 0) { + canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize"); + if (canVideoResize) { +#if __sgi + /* This is a hack because IRIX 6.2, 6.3, and some 6.4 + versions were released with GLX_SGIX_video_resize + being advertised by the X server though the video + resize extension is not actually supported. We try to + determine if the libGL.so we are using actually has a + video resize entrypoint before we try to use the + feature. */ + void (*func) (void); + void *glxDso = dlopen("libGL.so", RTLD_LAZY); + + func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX"); + if (!func) { + canVideoResize = 0; + } else +#endif + { + char *channelString; + int (*handler) (Display *, XErrorEvent *); + + channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL"); + videoResizeChannel = channelString ? atoi(channelString) : 0; + + /* Work around another annoying problem with SGI's + GLX_SGIX_video_resize implementation. Early IRIX + 6.4 OpenGL's advertise the extension and have the + video resize API, but an XSGIvc X protocol errors + result trying to use the API. Set up an error + handler to intercept what would otherwise be a fatal + error. If an error was recieved, do not report that + video resize is possible. */ + handler = XSetErrorHandler(catchXSGIvcErrors); + + errorCaught = 0; + + glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, &dx, &dy, &dw, &dh); + + /* glXQueryChannelDeltasSGIX is an inherent X server + round-trip so we know we will have gotten either the + correct reply or and error by this time. */ + XSetErrorHandler(handler); + + /* Still yet another work around. In IRIX 6.4 betas, + glXQueryChannelDeltasSGIX will return as if it + succeeded, but the values are filled with junk. + Watch to make sure the delta variables really make + sense. */ + if (errorCaught || + dx < 0 || dy < 0 || dw < 0 || dh < 0 || + dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) { + canVideoResize = 0; + } + } + } + } +#endif /* GLX_SGIX_video_resize */ + + switch (param) { + case GLUT_VIDEO_RESIZE_POSSIBLE: + return canVideoResize; + case GLUT_VIDEO_RESIZE_IN_USE: + return videoResizeInUse; + case GLUT_VIDEO_RESIZE_X_DELTA: + return dx; + case GLUT_VIDEO_RESIZE_Y_DELTA: + return dy; + case GLUT_VIDEO_RESIZE_WIDTH_DELTA: + return dw; + case GLUT_VIDEO_RESIZE_HEIGHT_DELTA: + return dh; + case GLUT_VIDEO_RESIZE_X: + case GLUT_VIDEO_RESIZE_Y: + case GLUT_VIDEO_RESIZE_WIDTH: + case GLUT_VIDEO_RESIZE_HEIGHT: +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (videoResizeInUse) { + int x, y, width, height; + + glXQueryChannelRectSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, &x, &y, &width, &height); + switch (param) { + case GLUT_VIDEO_RESIZE_X: + return x; + case GLUT_VIDEO_RESIZE_Y: + return y; + case GLUT_VIDEO_RESIZE_WIDTH: + return width; + case GLUT_VIDEO_RESIZE_HEIGHT: + return height; + } + } +#endif + return -1; + default: + __glutWarning("invalid glutVideoResizeGet parameter: %d", param); + return -1; + } +} + +void APIENTRY +glutSetupVideoResizing(void) +{ +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { + glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, __glutCurrentWindow->win); + videoResizeInUse = 1; + } else +#endif + __glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n"); +} + +void APIENTRY +glutStopVideoResizing(void) +{ +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) { + if (videoResizeInUse) { + glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, None); + videoResizeInUse = 0; + } + } +#endif +} + +/* ARGSUSED */ +void APIENTRY +glutVideoResize(int x, int y, int width, int height) +{ +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (videoResizeInUse) { +#ifdef GLX_SYNC_SWAP_SGIX + /* glXChannelRectSyncSGIX introduced in a patch to IRIX + 6.2; the original unpatched IRIX 6.2 behavior is always + GLX_SYNC_SWAP_SGIX. */ + glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, GLX_SYNC_SWAP_SGIX); +#endif + glXChannelRectSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, x, y, width, height); + } +#endif +} + +/* ARGSUSED */ +void APIENTRY +glutVideoPan(int x, int y, int width, int height) +{ +#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize) + if (videoResizeInUse) { +#ifdef GLX_SYNC_FRAME_SGIX + /* glXChannelRectSyncSGIX introduced in a patch to IRIX + 6.2; the original unpatched IRIX 6.2 behavior is always + GLX_SYNC_SWAP_SGIX. We just ignore that we cannot + accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2; + this means you'd need a glutSwapBuffers to actually + realize the video resize. */ + glXChannelRectSyncSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, GLX_SYNC_FRAME_SGIX); +#endif + glXChannelRectSGIX(__glutDisplay, __glutScreen, + videoResizeChannel, x, y, width, height); + } +#endif +} + +/* ENDCENTRY */ |