Apply the following changes in order to get CAVEStereoModule compilable and
in use again with Tundra 2.
CMakeLists.txt:
Replace "init_target (CAVEStereoModule OUTPUT modules/core)" with
"init_target (EnvironmentModule OUTPUT plugins)"
Remove "CopyModuleXMLFile()"
StereoController.h:
Remove #include "Foundation.h"
Add #include <QObject>
StereoController.cpp
Add #include "LoggingFunctions.h"
Replace all CAVEStereoModule::LogWarning etc With LogWarning etc
StableHeaders.h:
Remove #include "CoreStdIncludes.h"
Remove #include "Core.h"
Remove #include "Foundation.h"
Add #include "CoreDefines.h"
CAVEStereoModule.h
Remove #include "ModuleLoggingFunctions.h"
Remove "namespace Foundation { class Framework; }" forward declaration
On line "class CAVESTEREO_MODULE_API CAVEStereoModule : public QObject,
public IModule remove "public QObject," as IModule already inherits QObject
Remove MODULE_LOGGING_FUNCTIONS;
StereoWidget.h
Replace "namespace Foundation { class Framework; }" with " class Framework
Replace "Foundation::Framework" with Framework
StereoWidget.cpp
Remove #include "ServiceManager.h"
Remove #include "UiServiceInterface.h"
Replace "Foundation::Framework" with Framework
ExternalRenderWindow.cpp
Add #include "CoreStringUtils.h"
CAVEView.cpp
Add #include "OgreWorld.h"
Replace all "renderer_.lock()->GetSceneManager()" with
"renderer_.lock()->GetActiveOgreWorld()->GetSceneManager()"
Replace all "renderer_.lock()->GetCurrentCamera()" with
"renderer_.lock()->GetActiveOgreCamera();
CAVEStereoModule.cpp
Replace
"framework_->GetModuleManager()->GetModule<OgreRenderer::OgreRenderingModule>().lock().get();"
with "framework_->GetModule<OgreRenderer::OgreRenderingModule>();"
Add #include "Profiler.h"
Remove
"
extern "C" void POCO_LIBRARY_API SetProfiler(Foundation::Profiler
*profiler);
void SetProfiler(Foundation::Profiler *profiler)
{
Foundation::ProfilerSection::SetProfiler(profiler);
}
using namespace CAVEStereo;
POCO_BEGIN_MANIFEST(IModule)
POCO_EXPORT_CLASS(CAVEStereoModule)
POCO_END_MANIFEST
"
and replace with
"
extern "C"
{
DLLEXPORT void TundraPluginMain(Framework *fw)
{
Framework::SetInstance(fw); // Inside this DLL, remember the pointer to
the global framework object.
IModule *module = new CAVEStereo::CAVEStereoModule();
fw->RegisterModule(module);
}
}
"
CAVESettingsWidget.h
Replace "namespace Foundation { class Framework; }" with "class Framework;"
Replace "Foundation::Framework" with "Framework"
CAVESettingsWidget.cpp
Remove #include "ModuleManager.h"
Remove #include "ServiceManager.h"
Remove #include "UiServiceInterface.h"
Replace "Foundation::Framework" with "Framework"
MenuBar.js
Add to appropriate spot:
"
// Settings
var settingsMenu = menu.addMenu("&Settings");
if (framework.GetModuleByName("CAVEStereo"))
{
var caveSettings = settingsMenu.addAction("&Settings", "Cave");
caveSettings.triggered.connect(OpenCaveWindow);
var stereoSettings = settingsMenu.addAction("&Settings", "Stereoscopy");
stereoSettings.triggered.connect(OpenStereoscopyWindow);
}
"
The OpenCaveWindow and OpenStereoscopyWindow ftunctions should be already
there.
Finally add CAVEStereoModule to bin/plugins.xml after OgreRenderingModule,
or you can also create your own plugins XML file if you want. Remember to
use it when starting Tundra, e.g. "Tundra --config MyConfig.xml".
plugins.xml is used by default if --config is not used.
Grey skies,
Ali Kämäräinen
--
http://groups.google.com/group/realxtend
http://www.realxtend.org