diff --git a/examples/osgtext3D/osgtext3D_orig.cpp b/examples/osgtext3D/osgtext3D_orig.cpp index b9c5dbb50..7ff252775 100644 --- a/examples/osgtext3D/osgtext3D_orig.cpp +++ b/examples/osgtext3D/osgtext3D_orig.cpp @@ -82,8 +82,14 @@ osg::Group* create3DText(const osg::Vec3& center,float radius) text3->setText("XZ_PLANE"); geode->addDrawable(text3); + osg::ref_ptr style = new osgText::Style; + osg::ref_ptr bevel = new osgText::Bevel; + bevel->roundedBevel2(0.25); + style->setBevel(bevel.get()); + osgText::Text3D* text7 = new osgText::Text3D; text7->setFont("fonts/times.ttf"); + text7->setStyle(style.get()); text7->setCharacterSize(characterSize); text7->setCharacterDepth(characterSize*0.2f); text7->setPosition(center - osg::Vec3(0.0, 0.0, 0.6)); diff --git a/include/osgText/Glyph b/include/osgText/Glyph index 46647474e..6bee19e7c 100644 --- a/include/osgText/Glyph +++ b/include/osgText/Glyph @@ -44,6 +44,9 @@ public: Glyph(Font* font, unsigned int glyphCode); + Font* getFont() { return _font; } + const Font* getFont() const { return _font; } + unsigned int getGlyphCode() const { return _glyphCode; } void setHorizontalBearing(const osg::Vec2& bearing); @@ -104,7 +107,7 @@ class OSGTEXT_EXPORT GlyphGeometry : public osg::Referenced GlyphGeometry(); - void setup(const Glyph* glyph, const Style* style); + void setup(const Glyph3D* glyph, const Style* style); bool match(const Style* style) const; @@ -128,6 +131,9 @@ class OSGTEXT_EXPORT GlyphGeometry : public osg::Referenced /** Get et the PrimitiveSetList for the back face. */ osg::Geometry::PrimitiveSetList& getBackPrimitiveSetList() { return _backPrimitiveSetList; } + /** Set whether to use a mutex to ensure ref() and unref() are thread safe.*/ + virtual void setThreadSafeRefUnref(bool threadSafe); + protected: osg::ref_ptr