Updates to Makefiles to include osgText.

Also a couple of undefined methods in osgText::Text have been added.
This commit is contained in:
Robert Osfield
2001-11-02 20:11:37 +00:00
parent 42faf78b47
commit 06abf2266b
15 changed files with 81 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
#!smake
SHELL=/bin/sh
DIRS = sgv osgconv osgcube osgreflect osgtexture osgimpostor osgviews hangglide osgcluster
DIRS = sgv osgconv osgcube osgreflect osgtexture osgimpostor osgviews osgtext hangglide osgcluster
all :
for f in $(DIRS) ; do cd $$f; $(MAKE) || exit 1; cd ..; done

View File

@@ -2,7 +2,7 @@
SHELL=/bin/sh
DIRS = osg osgDB osgUtil osgGLUT Demos osgPlugins
DIRS = osg osgDB osgUtil osgText osgGLUT Demos osgPlugins
all :
for f in $(DIRS) ; do cd $$f; $(MAKE) || exit 1; cd ..; done
@@ -21,6 +21,7 @@ docs :
(cd osgUtil; $(MAKE) docs; )
(cd osgDB; $(MAKE) docs; )
(cd osgGLUT; $(MAKE) docs; )
(cd osgText; $(MAKE) docs; )
to_unix :
for f in $(DIRS) ; do cd $$f; to_unix Makefile Makefile; cd ..; done

View File

@@ -77,6 +77,7 @@ TARGET_INCLUDE_FILES = \
osg/FrontFace\
osg/GL\
osg/GLExtensions\
osg/GLU\
osg/GeoSet\
osg/Geode\
osg/Group\

View File

@@ -22,6 +22,8 @@ TARGET_INCLUDE_FILES = \
osgGLUT/Version\
osgGLUT/Window\
osgGLUT/Viewer\
osgGLUT/glut\
C++FLAGS += -I ../../include

View File

@@ -25,6 +25,7 @@
#include "FTGLTextureFont.h"
using namespace osg;
using namespace osgText;
// define the default paths to look for fonts.
@@ -356,6 +357,32 @@ Text::
{
}
void Text::setFont(Font* font)
{
if (_font==font) return;
if(font && font->isOk())
{
_init=true;
_font=font;
if(dynamic_cast<PolygonFont*>(_font.get()))
_fontType=POLYGON;
else if(dynamic_cast<BitmapFont*>(_font.get()))
_fontType=BITMAP;
else if(dynamic_cast<PixmapFont*>(_font.get()))
_fontType=PIXMAP;
else if(dynamic_cast<TextureFont*>(_font.get()))
_fontType=TEXTURE;
else if(dynamic_cast<OutlineFont*>(_font.get()))
_fontType=OUTLINE;
_initAlignement = false;
dirtyBound();
}
}
void Text::
setDefaults()
{
@@ -415,8 +442,7 @@ computeBound() const
return true;
}
void Text::
drawImmediateMode(State& state)
void Text::drawImmediateMode(State& state)
{
if(!_init)
return;