First batch of changes required for MacOS X build. Orignal submission from
Phil Atkin, merged by Robert Osfield.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
// non windows, doesn't require nonesense as seen below :-)
|
||||
#ifndef __gl_h_
|
||||
#ifdef __APPLE_CC__
|
||||
#ifdef __DARWIN_OSX__
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
|
||||
@@ -27,6 +27,16 @@ FTGLTextureFont::FTGLTextureFont()
|
||||
padding(1)
|
||||
{}
|
||||
|
||||
FTGLTextureFont::FTGLTextureFont(int textureSize)
|
||||
: maxTextSize(textureSize),
|
||||
textureWidth(0),
|
||||
textureHeight(0),
|
||||
numTextures(1),
|
||||
textMem(0),
|
||||
glyphHeight(0),
|
||||
glyphWidth(0),
|
||||
padding(1)
|
||||
{}
|
||||
|
||||
FTGLTextureFont::~FTGLTextureFont()
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ class FTGL_EXPORT FTGLTextureFont : public FTFont
|
||||
* Default Constructor
|
||||
*/
|
||||
FTGLTextureFont();
|
||||
FTGLTextureFont(int textureSize);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
||||
@@ -31,7 +31,7 @@ using namespace osgText;
|
||||
|
||||
// define the default paths to look for fonts.
|
||||
// note delimator is : for unix, ; for windows.
|
||||
#if defined(__linux) || defined(__FreeBSD__) || defined (__sgi)
|
||||
#if defined(__linux) || defined(__FreeBSD__) || defined (__sgi) || defined (__DARWIN_OSX__)
|
||||
static char* s_FontFilePath = ".:/usr/share/fonts/ttf:/usr/share/fonts/ttf/western:/usr/share/fonts/ttf/decoratives";
|
||||
#elif defined(WIN32)
|
||||
static char* s_FontFilePath = ".;C:/windows/fonts";
|
||||
@@ -67,6 +67,7 @@ Font()
|
||||
_created=false;
|
||||
|
||||
_pointSize=14;
|
||||
_textureSize=0;
|
||||
_res=72;
|
||||
}
|
||||
|
||||
@@ -246,13 +247,28 @@ createFontObj(void)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PixmapFont
|
||||
// TextureFont
|
||||
|
||||
TextureFont::
|
||||
TextureFont(const std::string& font,
|
||||
int point_size):
|
||||
RasterFont(font)
|
||||
{
|
||||
_textureSize=0;
|
||||
if(init(font))
|
||||
{
|
||||
}
|
||||
_pointSize=point_size;
|
||||
}
|
||||
|
||||
|
||||
TextureFont::
|
||||
TextureFont(const std::string& font,
|
||||
int point_size,
|
||||
int textureSize ):
|
||||
RasterFont(font)
|
||||
{
|
||||
_textureSize=textureSize;
|
||||
if(init(font))
|
||||
{
|
||||
}
|
||||
@@ -260,13 +276,14 @@ RasterFont(font)
|
||||
}
|
||||
|
||||
|
||||
|
||||
FTFont* TextureFont::
|
||||
createFontObj(void)
|
||||
{
|
||||
return (FTFont*)(new FTGLTextureFont);
|
||||
return (FTFont*)(new FTGLTextureFont(_textureSize));
|
||||
}
|
||||
|
||||
// PixmapFont
|
||||
// TextureFont
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,6 +30,7 @@ TARGET_BASENAME = osgText
|
||||
|
||||
|
||||
LIBS = -L$(OSGHOME)/lib -lfreetype -losgDB -losg $(GL_LIBS)
|
||||
MACOSXLIBS = -L$(OSGHOME)/lib -lfreetype -losgDB -losg -lstdc++
|
||||
|
||||
LIB = $(OSGHOME)/lib/lib$(TARGET_BASENAME).$(SO_EXT)
|
||||
#LIB = $(OSGHOME)/lib/lib$(TARGET_BASENAME).a
|
||||
|
||||
Reference in New Issue
Block a user