Having a little trouble getting working with Hydrax. I'm not entirely sure as to where to begin to incorporate it?
I tried to do a straight rip from the demo .cpp of Hydrax, but end up with the following errors:
Code: Select all
1>------ Build started: Project: Ogre3D Flight Simulator, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\ogresdk\samples\include\exampleapplication.h(172) : warning C4101: 'mPaused' : unreferenced local variable
1>c:\ogresdk\samples\include\exampleapplication.h(171) : warning C4101: 'mSpeedFactor' : unreferenced local variable
1>c:\ogresdk\samples\include\exampleapplication.h(173) : warning C4101: 'mPostFiltering' : unreferenced local variable
1>c:\users\cobra\desktop\ogre3d\hydrax-v0.2\hydrax\src\noise\noiseutils.h(635) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
1>c:\users\cobra\desktop\ogre3d\hydrax-v0.2\hydrax\src\noise\noiseutils.h(1028) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setPolygonMode(int const &)" (__imp_?setPolygonMode@Hydrax@1@QAEXABH@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setFullReflectionDistance(float const &)" (__imp_?setFullReflectionDistance@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setGlobalTransparency(float const &)" (__imp_?setGlobalTransparency@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setCausticsScale(float const &)" (__imp_?setCausticsScale@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setSmoothPower(float const &)" (__imp_?setSmoothPower@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setDepthColor(class Ogre::Vector3 const &)" (__imp_?setDepthColor@Hydrax@1@QAEXABVVector3@Ogre@@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setNormalDistortion(float const &)" (__imp_?setNormalDistortion@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setSunColor(class Ogre::Vector3 const &)" (__imp_?setSunColor@Hydrax@1@QAEXABVVector3@Ogre@@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setDepthLimit(float const &)" (__imp_?setDepthLimit@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setPlanesError(float const &)" (__imp_?setPlanesError@Hydrax@1@QAEXABM@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setPosition(class Ogre::Vector3 const &)" (__imp_?setPosition@Hydrax@1@QAEXABVVector3@Ogre@@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::create(void)" (__imp_?create@Hydrax@1@QAEXXZ) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setShaderMode(enum Hydrax::MaterialManager::ShaderMode const &)" (__imp_?setShaderMode@Hydrax@1@QAEXABW4ShaderMode@MaterialManager@1@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setModule(class Hydrax::Module::Module *)" (__imp_?setModule@Hydrax@1@QAEXPAVModule@21@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setComponents(enum Hydrax::HydraxComponent const &)" (__imp_?setComponents@Hydrax@1@QAEXABW4HydraxComponent@1@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setRttOptions(struct Hydrax::RttOptions const &)" (__imp_?setRttOptions@Hydrax@1@QAEXABURttOptions@1@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hydrax::RttOptions::RttOptions(enum Hydrax::TextureQuality const &,enum Hydrax::TextureQuality const &,enum Hydrax::TextureQuality const &)" (__imp_??0RttOptions@Hydrax@@QAE@ABW4TextureQuality@1@00@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hydrax::Module::PerlinPG::PerlinPG(class Hydrax::Hydrax *,class Ogre::Plane const &,struct Hydrax::Module::PerlinPG::Options const &)" (__imp_??0PerlinPG@Module@Hydrax@@QAE@PAV22@ABVPlane@Ogre@@ABUOptions@012@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Hydrax::Hydrax::setMeshOptions(class Hydrax::Mesh::Options *)" (__imp_?setMeshOptions@Hydrax@1@QAEXPAVOptions@Mesh@1@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hydrax::Hydrax::Hydrax(class Ogre::SceneManager *,class Ogre::Camera *)" (__imp_??0Hydrax@0@QAE@PAVSceneManager@Ogre@@PAVCamera@2@@Z) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Hydrax::Module::PerlinPG::create(void)" (?create@PerlinPG@Module@Hydrax@@UAEXXZ)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Hydrax::Module::PerlinPG::update(float const &)" (?update@PerlinPG@Module@Hydrax@@UAEXABM@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Hydrax::Module::Module::saveCfg(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?saveCfg@Module@1Hydrax@@UAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Hydrax::Module::Module::loadCfg(class Ogre::ConfigFile &)" (?loadCfg@Module@1Hydrax@@UAE_NAAVConfigFile@Ogre@@@Z)
1>Main.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall Hydrax::Module::PerlinPG::getHeigth(class Ogre::Vector2 const &)" (?getHeigth@PerlinPG@Module@Hydrax@@UAEMABVVector2@Ogre@@@Z)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hydrax::Size::~Size(void)" (__imp_??1Size@Hydrax@@QAE@XZ) referenced in function "public: __thiscall Hydrax::Mesh::ProjectedGridOptions::ProjectedGridOptions(int const &)" (??0ProjectedGridOptions@Mesh@Hydrax@@QAE@ABH@Z)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Hydrax::Size::Size(int const &,int const &)" (__imp_??0Size@Hydrax@@QAE@ABH0@Z) referenced in function "public: __thiscall Hydrax::Mesh::ProjectedGridOptions::ProjectedGridOptions(int const &)" (??0ProjectedGridOptions@Mesh@Hydrax@@QAE@ABH@Z)
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Hydrax::Module::PerlinPG::~PerlinPG(void)" (__imp_??1PerlinPG@Module@Hydrax@@UAE@XZ) referenced in function "public: virtual void * __thiscall Hydrax::Module::PerlinPG::`scalar deleting destructor'(unsigned int)" (??_GPerlinPG@Module@Hydrax@@UAEPAXI@Z)
1>..\bin\Debug\Engine.exe : fatal error LNK1120: 28 unresolved externals
1>Build log was saved at "file://c:\Users\Cobra\Desktop\Ogre3D Flight Simulator\Ogre3D Flight Simulator\Ogre3D Flight Simulator\Debug\BuildLog.htm"
1>Ogre3D Flight Simulator - 29 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
this is my Code;
Code: Select all
#include "ExampleApplication.h"
#include "Caelum.h"
#include "Hydrax.h"
#include "Modules/Perlin/Perlin.h"
#include "Modules/PerlinPG/PerlinPG.h"
#define _def_SkyBoxNum 5
#define _def_PGComplexity 256
class TutorialApplication : public ExampleApplication
{
protected:
public:
TutorialApplication()
{
}
~TutorialApplication()
{
}
protected:
void createScene(void)
{
SceneNode *myNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
Entity *islandEntity = mSceneMgr->createEntity("island","island.mesh");
myNode->attachObject(islandEntity);
Hydrax::Hydrax* mHydrax = new Hydrax::Hydrax(mSceneMgr, mCamera);
mHydrax->setMeshOptions(
static_cast<Hydrax::Mesh::Options*>(new Hydrax::Mesh::ProjectedGridOptions(_def_PGComplexity)));
Hydrax::Module::PerlinPG *mModule
= new Hydrax::Module::PerlinPG(mHydrax,
Ogre::Plane(Ogre::Vector3(0,1,0),
Ogre::Vector3(0,0,0)),
Hydrax::Module::PerlinPG::Options(_def_PGComplexity));
mHydrax->setRttOptions(
Hydrax::RttOptions(
Hydrax::TEX_QUA_1024,
Hydrax::TEX_QUA_1024,
Hydrax::TEX_QUA_1024));
mHydrax->setComponents(
static_cast<Hydrax::HydraxComponent>(Hydrax::HYDRAX_COMPONENT_SUN |
Hydrax::HYDRAX_COMPONENT_FOAM |
Hydrax::HYDRAX_COMPONENT_DEPTH |
Hydrax::HYDRAX_COMPONENT_SMOOTH |
Hydrax::HYDRAX_COMPONENT_CAUSTICS));
mHydrax->setModule(static_cast<Hydrax::Module::Module*>(mModule));
mHydrax->setShaderMode(Hydrax::MaterialManager::SM_HLSL);
mHydrax->create();
mHydrax->setPosition(Ogre::Vector3(0,0,0));
mHydrax->setPlanesError(37.5);
mHydrax->setDepthLimit(110);
mHydrax->setSunColor(Vector3(1,1,1));
mHydrax->setNormalDistortion(0.025);
mHydrax->setDepthColor(Ogre::Vector3(0.04,0.135,0.185));
mHydrax->setSmoothPower(5);
mHydrax->setCausticsScale(12);
mHydrax->setGlobalTransparency(0.1);
mHydrax->setFullReflectionDistance(99999997952.0);
mHydrax->setGlobalTransparency(0);
mHydrax->setPolygonMode(0);
}
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
// Create application object
TutorialApplication app;
try {
app.go();
} catch( Ogre::Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA( NULL, e.what(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n",
e.what());
#endif
}
return 0;
}
Forgive me if this is a really stupid error. I'm still new to C++ and Ogre.