Revision: 8569
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8569&view=rev
Author:   hsujohnhsu
Date:     2010-03-09 19:20:44 +0000 (Tue, 09 Mar 2010)

Log Message:
-----------
function call for adding resource path to ogre for texture

Modified Paths:
--------------
    code/gazebo/trunk/server/rendering/Material.cc
    code/gazebo/trunk/server/rendering/Material.hh

Modified: code/gazebo/trunk/server/rendering/Material.cc
===================================================================
--- code/gazebo/trunk/server/rendering/Material.cc      2010-03-09 18:23:44 UTC 
(rev 8568)
+++ code/gazebo/trunk/server/rendering/Material.cc      2010-03-09 19:20:44 UTC 
(rev 8569)
@@ -1,5 +1,6 @@
 #include <algorithm>
 #include "Material.hh"
+#include <Ogre.h>
 
 using namespace gazebo;
 
@@ -48,6 +49,14 @@
 }
 
 
////////////////////////////////////////////////////////////////////////////////
+// Set a texture image with resource_path
+void Material::SetTextureImage(const std::string tex,const std::string 
resource_path)
+{
+  Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 
resource_path, "FileSystem", "General");
+  this->texImage = tex;
+}
+
+////////////////////////////////////////////////////////////////////////////////
 /// Get a thie texture image
 std::string Material::GetTextureImage() const
 {

Modified: code/gazebo/trunk/server/rendering/Material.hh
===================================================================
--- code/gazebo/trunk/server/rendering/Material.hh      2010-03-09 18:23:44 UTC 
(rev 8568)
+++ code/gazebo/trunk/server/rendering/Material.hh      2010-03-09 19:20:44 UTC 
(rev 8569)
@@ -30,6 +30,9 @@
     /// \brief Set a texture image
     public: void SetTextureImage(const std::string tex);
 
+    /// \brief Set a texture image
+    public: void SetTextureImage(const std::string tex,const std::string 
resource_path);
+
     /// \brief Get a thie texture image
     public: std::string GetTextureImage() const;
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to