Update to osgText to get things compiling under Windows.

This commit is contained in:
Robert Osfield
2001-10-31 12:27:48 +00:00
parent c45cdd14f9
commit 94ce36f9a3
4 changed files with 23 additions and 22 deletions

View File

@@ -70,6 +70,13 @@ Geoff Michel
- .bmp (Windows Bitmap fiile) loader plugin.
- OpenGL based stats reporting added to osgGLUT::Viewer.
Max Rheiner <mrn@paus.ch>
- osgText wrapping of FTGL text library.
- osgtext demo application.
Henry Maddocks <henryj@paradise.net.nz>
- FTGL from which osgText is based.
Paul Fredrikson
- new Matrix implementation.

View File

@@ -29,14 +29,7 @@
#include <osg/Vec2>
// http://homepages.paradise.net.nz/henryj/code/
/*
#include <FTFace.h>
#include <FTGLBitmapFont.h>
#include <FTGLPixmapFont.h>
#include <FTGLOutlineFont.h>
#include <FTGLPolygonFont.h>
#include <FTGLTextureFont.h>
*/
#include <osgText/Export>
class FTFont;

View File

@@ -17,16 +17,11 @@
#ifdef __APPLE_CC__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#ifndef GL_TEXTURE_2D_BINDING_EXT
#include <OpenGL/glext.h>
#endif
#else
#include <GL/gl.h>
#include <GL/glu.h>
#ifndef GL_TEXTURE_2D_BINDING_EXT
#include <GL/glext.h>
#endif
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#endif
// required for compatibility with glext.h style function definitions of
@@ -77,13 +72,19 @@
#ifndef __gl_h_
#include <GL/gl.h>
#include <GL/glu.h>
#ifndef GL_TEXTURE_2D_BINDING_EXT
#include <GL/glext.h>
#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

View File

@@ -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);