diff --git a/Make/makedefs.linux b/Make/makedefs.linux index fd00c1b15..ce72f7827 100644 --- a/Make/makedefs.linux +++ b/Make/makedefs.linux @@ -1,7 +1,7 @@ MAKEDIR = $(OSGHOME)/Make INSTRULES = $(MAKEDIR)/instrules MAKEDEPEND = Makedepend -OBJS = $(C++FILES:.cpp=.o) $(CFILES:.c=.o) $(YACCFILES:.y=.o) $(LEXFILES:.l=.o) +OBJS = $(C++FILES:.cpp=.o) $(CFILES:.c=.o) $(YACCFILES:.y=.o) $(LEXFILES:.l=.o) DEPFILES = $(OBJS:.o=.d) diff --git a/include/osgText/Version b/include/osgText/Version new file mode 100644 index 000000000..8bb9fc149 --- /dev/null +++ b/include/osgText/Version @@ -0,0 +1,37 @@ +//C++ header - Open Scene Graph - Copyright (C) 1998-2001 Robert Osfield +//Distributed under the terms of the GNU Library General Public License (LGPL) +//as published by the Free Software Foundation. + +#ifndef OSGTEXT_VERSION +#define OSGTEXT_VERSION 1 + +#include + +extern "C" { + +/** + * getVersion_osg() returns the library version number. + * Numbering convention : osg_src-0.8-31 will return 0.8.31 from getVersion_osg. + * + * This C function can be also used to check for the existence of the OpenSceneGraph + * library using autoconf and its m4 macro AC_CHECK_LIB. + * + * Here is the code to add to your configure.in: + \verbatim + # + # Check for the OpenSceneGraph (OSG) library + # + AC_CHECK_LIB(osg, osgTextGetVersion, , + [AC_MSG_ERROR(OpenSceneGraph library not found. See http://www.openscenegraph.org)],) + \endverbatim +*/ +extern OSGTEXT_EXPORT const char* osgTextGetVersion(); + +/** + * osgTextGetLibraryName() returns the library name in human friendly form. +*/ +extern OSGTEXT_EXPORT const char* osgTextGetLibraryName(); + +}; + +#endif diff --git a/src/osgText/Makefile b/src/osgText/Makefile index 13ee5a95c..c9f66404a 100644 --- a/src/osgText/Makefile +++ b/src/osgText/Makefile @@ -2,10 +2,27 @@ include ../../Make/makedefs C++FILES = \ - GLUTEventAdapter.cpp\ - Version.cpp\ - Window.cpp\ - Viewer.cpp\ + FTBitmapGlyph.cpp \ + FTGLOutlineFont.cpp \ + FTGlyphContainer.cpp \ + FTSize.cpp \ + FTCharmap.cpp \ + FTGLPixmapFont.cpp \ + FTLibrary.cpp \ + FTTextureGlyph.cpp \ + FTFace.cpp \ + FTGLPolygonFont.cpp \ + FTOutlineGlyph.cpp \ + FTVectoriser.cpp \ + FTFont.cpp \ + FTGLTextureFont.cpp \ + FTPixmapGlyph.cpp \ + FTGLBitmapFont.cpp \ + FTGlyph.cpp \ + FTPolyGlyph.cpp \ + Text.cpp \ + Version.cpp + TARGET_BASENAME = osgGLUT @@ -17,13 +34,11 @@ LIB = ../../lib/lib$(TARGET_BASENAME).so TARGET_LIB_FILES = lib$(TARGET_BASENAME).so TARGET_INCLUDE_FILES = \ - osgGLUT/Export\ - osgGLUT/GLUTEventAdapter\ - osgGLUT/Version\ - osgGLUT/Window\ - osgGLUT/Viewer\ + osgText/Export\ + osgText/Version\ + osgText/Text -C++FLAGS += -I ../../include +C++FLAGS += -I ../../include -I /usr/local/include/freetype2 -I /usr/local/include/freetype2/freetype include ../../Make/makerules diff --git a/src/osgText/Text.cpp b/src/osgText/Text.cpp index 7196d3d82..c5c1f291b 100644 --- a/src/osgText/Text.cpp +++ b/src/osgText/Text.cpp @@ -13,7 +13,15 @@ */ -#include +#include + +#include "FTFace.h" +#include "FTGLBitmapFont.h" +#include "FTGLPixmapFont.h" +#include "FTGLOutlineFont.h" +#include "FTGLPolygonFont.h" +#include "FTGLTextureFont.h" + using namespace osgText; @@ -326,7 +334,7 @@ setDefaults() _fontType=UNDEF; _alignement=LEFT_BOTTOM; - _drawMode=DrawModeType::DEFAULT; + _drawMode=DEFAULT; _boundingBoxType=GLYPH; _boundingBoxType=GEOMETRY;