From 071891c64c9ea11ddd404661740aca51b3a48919 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Sun, 24 Oct 2004 21:05:27 +0000 Subject: [PATCH] Namespaced Rect and Frame to osgfxbrowser::Rect/Frame, as this was causing a namespace collision with CGL --- examples/osgfxbrowser/Frame.cpp | 4 ++++ examples/osgfxbrowser/Frame.h | 4 ++++ examples/osgfxbrowser/osgfxbrowser.cpp | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/osgfxbrowser/Frame.cpp b/examples/osgfxbrowser/Frame.cpp index f6cfeb40a..236261368 100644 --- a/examples/osgfxbrowser/Frame.cpp +++ b/examples/osgfxbrowser/Frame.cpp @@ -2,6 +2,8 @@ #include +namespace osgfxbrowser { + Frame::Frame() : osg::Geode(), bgcolor_(0.5f, 0.5f, 0.5f, 1.0f), @@ -95,3 +97,5 @@ osg::Geometry *Frame::build_quad(const Rect &rect, const osg::Vec4 &color, bool return geo.take(); } + +} diff --git a/examples/osgfxbrowser/Frame.h b/examples/osgfxbrowser/Frame.h index bf50053df..1253ecaf3 100644 --- a/examples/osgfxbrowser/Frame.h +++ b/examples/osgfxbrowser/Frame.h @@ -4,6 +4,8 @@ #include #include +namespace osgfxbrowser { + struct Rect { float x0, y0, x1, y1; Rect() {} @@ -44,4 +46,6 @@ private: std::string caption_; }; +} + #endif diff --git a/examples/osgfxbrowser/osgfxbrowser.cpp b/examples/osgfxbrowser/osgfxbrowser.cpp index 1c08622d1..838b219a5 100644 --- a/examples/osgfxbrowser/osgfxbrowser.cpp +++ b/examples/osgfxbrowser/osgfxbrowser.cpp @@ -48,7 +48,7 @@ public: RotateCallback *rotate_cb; -class EffectPanel: public Frame { +class EffectPanel: public osgfxbrowser::Frame { public: class KeyboardHandler: public osgGA::GUIEventHandler { @@ -151,7 +151,7 @@ public: } protected: - void rebuild_client_area(const Rect &client_rect) + void rebuild_client_area(const osgfxbrowser::Rect &client_rect) { float zPos = -0.1; // note from Robert, was 0.1f, but now must be -0.1f to keep text visible??#!? due // to some other change in the OSG not tracked down yet... @@ -252,7 +252,7 @@ EffectPanel *build_gui(osg::Group *root) osg::ref_ptr effect_panel = new EffectPanel; effect_panel->setCaption("osgFX Effect Browser"); - effect_panel->setRect(Rect(20, 20, 1000, 280)); + effect_panel->setRect(osgfxbrowser::Rect(20, 20, 1000, 280)); hud->addChild(effect_panel.get());