Revision: 7665
http://playerstage.svn.sourceforge.net/playerstage/?rev=7665&view=rev
Author: natepak
Date: 2009-05-14 18:53:16 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Put openal stuff into a separate library
Modified Paths:
--------------
code/gazebo/trunk/server/CMakeLists.txt
code/gazebo/trunk/server/World.cc
code/gazebo/trunk/server/World.hh
code/gazebo/trunk/server/gui/CMakeLists.txt
Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt 2009-05-14 18:44:51 UTC (rev
7664)
+++ code/gazebo/trunk/server/CMakeLists.txt 2009-05-14 18:53:16 UTC (rev
7665)
@@ -1,7 +1,6 @@
INCLUDE (${gazebo_cmake_dir}/GazeboUtils.cmake)
-#${FLTK_INCLUDE_DIR}
########################################
# Include all the search paths for headers
INCLUDE_DIRECTORIES(
@@ -64,6 +63,7 @@
Param.cc
GraphicsIfaceHandler.cc
GuiAPI.cc
+ OpenALAPI.cc
Simulator.cc
)
@@ -88,6 +88,7 @@
Param.hh
GraphicsIfaceHandler.hh
GuiAPI.hh
+ OpenALAPI.hh
Simulator.hh
)
@@ -110,7 +111,6 @@
TARGET_LINK_LIBRARIES( gazebo-exec
${gazeboserver_link_libs}
- ${FLTK_LIBRARIES}
${boost_libraries}
${freeimage_library}
gazebo_server
Modified: code/gazebo/trunk/server/World.cc
===================================================================
--- code/gazebo/trunk/server/World.cc 2009-05-14 18:44:51 UTC (rev 7664)
+++ code/gazebo/trunk/server/World.cc 2009-05-14 18:53:16 UTC (rev 7665)
@@ -41,9 +41,7 @@
#include "gazebo.h"
#include "World.hh"
-#ifdef HAVE_OPENAL
-#include "OpenAL.hh"
-#endif
+#include "OpenALAPI.hh"
#include "Geom.hh"
@@ -63,6 +61,7 @@
this->physicsEngine = NULL;
this->server = NULL;
this->graphics = NULL;
+ this->openAL = NULL;
}
////////////////////////////////////////////////////////////////////////////////
@@ -113,6 +112,10 @@
gzthrow(e);
}
+ if (this->openAL)
+ delete this->openAL;
+ this->openAL = NULL;
+
}
////////////////////////////////////////////////////////////////////////////////
@@ -146,11 +149,12 @@
this->graphics = new GraphicsIfaceHandler();
this->graphics->Load("default");
-#ifdef HAVE_OPENAL
// Load OpenAL audio
if (rootNode->GetChild("openal","audio"))
- OpenAL::Instance()->Load( rootNode->GetChild("openal", "audio") );
-#endif
+ {
+ this->openAL = new OpenALAPI();
+ this->openAL->Load(rootNode->GetChild("openal", "audio"));
+ }
this->physicsEngine = new ODEPhysics(); //TODO: use exceptions here
@@ -203,9 +207,8 @@
this->physicsEngine->Init();
// Initialize openal
-#ifdef HAVE_OPENAL
- OpenAL::Instance()->Init();
-#endif
+ if (this->openAL)
+ this->openAL->Init();
this->toAddModels.clear();
this->toDeleteModels.clear();
@@ -315,9 +318,8 @@
}
// Close the openal server
-#ifdef HAVE_OPENAL
- OpenAL::Instance()->Fini();
-#endif
+ if (this->openAL)
+ this->openAL->Fini();
}
////////////////////////////////////////////////////////////////////////////////
Modified: code/gazebo/trunk/server/World.hh
===================================================================
--- code/gazebo/trunk/server/World.hh 2009-05-14 18:44:51 UTC (rev 7664)
+++ code/gazebo/trunk/server/World.hh 2009-05-14 18:53:16 UTC (rev 7665)
@@ -47,6 +47,7 @@
class PhysicsEngine;
class XMLConfigNode;
class GraphicsIfaceHandler;
+ class OpenALAPI;
/// \brief The World
/*
@@ -211,6 +212,8 @@
/// Length of time to run before receiving a "go" command
private: double simPauseTime;
+ private: OpenALAPI *openAL;
+
private: friend class DestroyerT<World>;
private: friend class SingletonT<World>;
Modified: code/gazebo/trunk/server/gui/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/gui/CMakeLists.txt 2009-05-14 18:44:51 UTC (rev
7664)
+++ code/gazebo/trunk/server/gui/CMakeLists.txt 2009-05-14 18:53:16 UTC (rev
7665)
@@ -1,3 +1,7 @@
+INCLUDE_DIRECTORIES(
+ ${FLTK_INCLUDE_DIR}
+)
+
SET (sources Gui.cc
GLWindow.cc
MainMenu.cc
@@ -19,6 +23,9 @@
ADD_LIBRARY(gazebo_gui STATIC ${sources})
ADD_LIBRARY(gazebo_gui-shared SHARED ${sources})
+TARGET_LINK_LIBRARIES(gazebo_gui ${FLTK_LIBRARIES} )
+TARGET_LINK_LIBRARIES(gazebo_gui-shared ${FLTK_LIBRARIES} )
+
#SET_TARGET_PROPERTIES(gazebo_gui-static PROPERTIES OUTPUT_NAME "gazebo_gui")
SET_TARGET_PROPERTIES(gazebo_gui-shared PROPERTIES OUTPUT_NAME "gazebo_gui")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit