From 94ce36f9a3e0d761f10a613a1e13bc3f7e289485 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 31 Oct 2001 12:27:48 +0000 Subject: [PATCH] Update to osgText to get things compiling under Windows. --- AUTHORS | 7 +++++++ include/osgText/Text | 9 +-------- src/osgText/FTGL.h | 25 +++++++++++++------------ src/osgText/FTSize.cpp | 4 ++-- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/AUTHORS b/AUTHORS index 58a091c63..3d1fe8662 100644 --- a/AUTHORS +++ b/AUTHORS @@ -70,6 +70,13 @@ Geoff Michel - .bmp (Windows Bitmap fiile) loader plugin. - OpenGL based stats reporting added to osgGLUT::Viewer. +Max Rheiner + - osgText wrapping of FTGL text library. + - osgtext demo application. + +Henry Maddocks + - FTGL from which osgText is based. + Paul Fredrikson - new Matrix implementation. diff --git a/include/osgText/Text b/include/osgText/Text index 294383ea1..d29d31951 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -29,14 +29,7 @@ #include // http://homepages.paradise.net.nz/henryj/code/ -/* -#include -#include -#include -#include -#include -#include -*/ + #include class FTFont; diff --git a/src/osgText/FTGL.h b/src/osgText/FTGL.h index 1ea781d82..6faa1297e 100644 --- a/src/osgText/FTGL.h +++ b/src/osgText/FTGL.h @@ -17,16 +17,11 @@ #ifdef __APPLE_CC__ #include #include - #ifndef GL_TEXTURE_2D_BINDING_EXT - #include - #endif #else - #include - #include - #ifndef GL_TEXTURE_2D_BINDING_EXT - #include - #endif - #endif + #include + #include + #endif + #endif // required for compatibility with glext.h style function definitions of @@ -77,13 +72,19 @@ #ifndef __gl_h_ #include #include - #ifndef GL_TEXTURE_2D_BINDING_EXT - #include - #endif #endif #endif +// lifted from glext.h, to remove dependancy on glext.h +#ifndef GL_EXT_texture_object + #define GL_TEXTURE_PRIORITY_EXT 0x8066 + #define GL_TEXTURE_RESIDENT_EXT 0x8067 + #define GL_TEXTURE_1D_BINDING_EXT 0x8068 + #define GL_TEXTURE_2D_BINDING_EXT 0x8069 + #define GL_TEXTURE_3D_BINDING_EXT 0x806A +#endif + #if defined(_MSC_VER) # ifdef FTGL_LIBRARY_STATIC // staticLib # define FTGL_EXPORT diff --git a/src/osgText/FTSize.cpp b/src/osgText/FTSize.cpp index 31a76db2e..a3271b653 100644 --- a/src/osgText/FTSize.cpp +++ b/src/osgText/FTSize.cpp @@ -44,11 +44,11 @@ int FTSize::Height() const float height; if( FT_IS_SFNT((*ftFace))) // Don't think this is correct { - height = (*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin; // bbox.yMax-bbox.yMin + height = ((*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin); // bbox.yMax-bbox.yMin } else { - height = (*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin >> 16; // bbox.yMax-bbox.yMin + height = ((*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin) >> 16; // bbox.yMax-bbox.yMin } height = height * ( (float)ftSize->metrics.y_ppem / (float)(*ftFace)->units_per_EM);