From 0cdc3e9506f08a3c557b69af1475e3df740c5d82 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 16 Dec 2007 17:01:40 +0000 Subject: [PATCH] Added intializers. --- include/osgText/Font | 3 ++- include/osgText/Font3D | 4 +++- src/osgText/Font.cpp | 21 +++++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/include/osgText/Font b/include/osgText/Font index 73580320d..7ce189df3 100644 --- a/include/osgText/Font +++ b/include/osgText/Font @@ -206,7 +206,8 @@ public: public: FontImplementation(): - osg::Referenced(true) {} + osg::Referenced(true), + _facade(0) {} virtual std::string getFileName() const = 0; diff --git a/include/osgText/Font3D b/include/osgText/Font3D index bece14be0..f3886480c 100644 --- a/include/osgText/Font3D +++ b/include/osgText/Font3D @@ -146,7 +146,8 @@ public: public: Font3DImplementation(): - osg::Referenced(true) {} + osg::Referenced(true), + _facade(0) {} virtual std::string getFileName() const = 0; @@ -188,6 +189,7 @@ public: public: Glyph3D(unsigned int glyphCode): + osg::Referenced(true), _glyphCode(glyphCode), _horizontalBearing(0,0), _horizontalAdvance(0), diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp index 86bf6ac22..3979f6a11 100644 --- a/src/osgText/Font.cpp +++ b/src/osgText/Font.cpp @@ -813,8 +813,25 @@ void Font::GlyphTexture::resizeGLObjectBuffers(unsigned int maxSize) // all the methods in Font::Glyph have been made non inline because VisualStudio6.0 is STUPID, STUPID, STUPID PILE OF JUNK. -Font::Glyph::Glyph() {} -Font::Glyph::~Glyph() {} +Font::Glyph::Glyph(): + _font(0), + _glyphCode(0), + _horizontalBearing(0.0f,0.f), + _horizontalAdvance(0.f), + _verticalBearing(0.0f,0.f), + _verticalAdvance(0.f), + _texture(0), + _texturePosX(0), + _texturePosY(0), + _minTexCoord(0.0f,0.0f), + _maxTexCoord(0.0f,0.0f) +{ + setThreadSafeRefUnref(true); +} + +Font::Glyph::~Glyph() +{ +} unsigned int Font::Glyph::getGlyphCode() const { return _glyphCode; }