Revision: 8726
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8726&view=rev
Author:   natepak
Date:     2010-05-28 17:24:13 +0000 (Fri, 28 May 2010)

Log Message:
-----------
Added in a flag for enabling RT_SHADER

Modified Paths:
--------------
    code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
    code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
    code/gazebo/branches/simpar/config.h.in
    code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
    code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc

Modified: code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc
===================================================================
--- code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/benchmarks/pioneer_circle_benchmark.cc  
2010-05-28 17:24:13 UTC (rev 8726)
@@ -173,7 +173,7 @@
   simIface->StartLogEntity("pioneer");
   simIface->Unpause();
 
-  double left = 1.0;
+  double left = 1.0/stepTime;
   double right = left*1.8;
 
   std::cout << "Left[" << left << "] Right[" << right << "]\n";

Modified: code/gazebo/branches/simpar/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/branches/simpar/cmake/SearchForStuff.cmake      2010-05-28 
16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/cmake/SearchForStuff.cmake      2010-05-28 
17:24:13 UTC (rev 8726)
@@ -94,10 +94,12 @@
     set(ogre_libraries ${OGRE-RTShaderSystem_LIBRARIES})
     set(ogre_cflags ${OGRE-RTShaderSystem_CFLAGS})
 
-    add_definitions(-DUSE_RTSHADER_SYSTEM)
+    set (INCLUDE_RTSHADER ON CACHE BOOL "Enable GPU shaders")
 
   else (OGRE-RTShaderSystem_FOUND)
 
+    set (INCLUDE_RTSHADER OFF CACHE BOOL "Enable GPU shaders")
+
     pkg_check_modules(OGRE OGRE>=${MIN_OGRE_VERSION})
     if (NOT OGRE_FOUND)
       BUILD_ERROR("Ogre3d version >=${MIN_OGRE_VERSION} and development files 
not found. See the following website for installation instructions: 
http://www.orge3d.org";)

Modified: code/gazebo/branches/simpar/config.h.in
===================================================================
--- code/gazebo/branches/simpar/config.h.in     2010-05-28 16:58:40 UTC (rev 
8725)
+++ code/gazebo/branches/simpar/config.h.in     2010-05-28 17:24:13 UTC (rev 
8726)
@@ -15,3 +15,4 @@
 #cmakedefine INCLUDE_BULLET 1
 #cmakedefine INCLUDE_ODE 1
 #cmakedefine INCLUDE_ODE_JOINT_DAMPING 1
+#cmakedefine INCLUDE_RTSHADER 1

Modified: code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc
===================================================================
--- code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc  2010-05-28 
16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/server/physics/ode/ODEJoint.cc  2010-05-28 
17:24:13 UTC (rev 8726)
@@ -325,12 +325,13 @@
     case VEL:
       this->SetParam(dParamVel, value);
       break;
-    case HI_STOP:
+    /*case HI_STOP:
       this->SetParam(dParamHiStop, value);
       break;
     case LO_STOP:
       this->SetParam(dParamLoStop, value);
       break;
+      */
     default:
       gzerr(0) << "Unable to handle joint attribute[" << attr << "]\n";
       break;

Modified: code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc
===================================================================
--- code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc      
2010-05-28 16:58:40 UTC (rev 8725)
+++ code/gazebo/branches/simpar/server/rendering/RTShaderSystem.cc      
2010-05-28 17:24:13 UTC (rev 8726)
@@ -53,7 +53,7 @@
 /// Init the run time shader system
 void RTShaderSystem::Init()
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
   if (Ogre::RTShader::ShaderGenerator::initialize())
   {
     Ogre::StringVector groupVector;
@@ -137,7 +137,7 @@
 
 void RTShaderSystem::Fini()
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
   // Restore default scheme.
   
Ogre::MaterialManager::getSingleton().setActiveScheme(Ogre::MaterialManager::DEFAULT_SCHEME_NAME);
 
@@ -162,7 +162,7 @@
 // Set an Ogre::Entity to use RT shaders
 void RTShaderSystem::AttachEntity(OgreVisual *vis)
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
   this->GenerateShaders(vis);
   this->entities.push_back(vis);
 #endif
@@ -172,7 +172,7 @@
 // Remove and entity
 void RTShaderSystem::DetachEntity(OgreVisual *vis)
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
   this->entities.remove(vis);
 #endif
 }
@@ -181,7 +181,7 @@
 /// Update the shaders
 void RTShaderSystem::UpdateShaders()
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
   std::list<OgreVisual*>::iterator iter;
 
   // Update all the shaders
@@ -194,7 +194,7 @@
 /// Generate shaders for an entity
 void RTShaderSystem::GenerateShaders(OgreVisual *vis)
 {
-#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= MINOR_VERSION
+#if INCLUDE_RTSHADER && OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 
MINOR_VERSION
 
   for (unsigned int k=0; k < vis->sceneNode->numAttachedObjects(); k++)
   {


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

------------------------------------------------------------------------------

_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to