Linux Build Problems

dermont

16-01-2013 08:37:15

There a few minor issues with building on Linux and creating the png images.

diff --git a/docs/manual/illustrations/src/Illustrations.cpp b/docs/manual/illustrations/src/Illustrations.cpp
--- a/docs/manual/illustrations/src/Illustrations.cpp
+++ b/docs/manual/illustrations/src/Illustrations.cpp
@@ -98,6 +98,9 @@
mWindow = mRoot->initialise(true);
mWindow->setDeactivateOnFocusChange(false);
mWindow->resize(256, 256);
+#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ mWindow->windowMovedOrResized();
+#endif
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
mSceneMgr = mRoot->createSceneManager(ST_GENERIC);
mCamera = mSceneMgr->createCamera("SimpleCamera");
@@ -120,8 +123,18 @@
mCamera->setPosition(distance * mCamera->getPosition().normalisedCopy());

// Write scene to png image
+ // Write scene to png image
+#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ WindowEventUtilities::messagePump();
+#endif
mRoot->renderOneFrame();
- mRoot->renderOneFrame();
+#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ WindowEventUtilities::messagePump();
+#endif
+ mRoot->renderOneFrame();
+#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ WindowEventUtilities::messagePump();
+#endif
mRoot->renderOneFrame();
mWindow->writeContentsToFile(name + ".png");

@@ -919,7 +932,10 @@
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
app.mOutputPath = strCmdLine;
#else
- app.mOutputPath = (argc > 1) ? argv[1] : getcwd();
+ //app.mOutputPath = (argc > 1) ? argv[1] : getcwd();
+ size_t size=_PC_PATH_MAX;
+ char path[size];
+ app.mOutputPath = (argc > 1) ? argv[1] : getcwd(path,size);
#endif

try {
@@ -938,4 +954,4 @@

#ifdef __cplusplus
}
-#endif
\ No newline at end of file
+#endif
diff --git a/library/include/ProceduralNoise.h b/library/include/ProceduralNoise.h
--- a/library/include/ProceduralNoise.h
+++ b/library/include/ProceduralNoise.h
@@ -40,6 +40,13 @@
size_t x;
size_t y;
} POINT;
+#else
+typedef struct POINT
+{
+ size_t x;
+ size_t y;
+};
+
#endif

class NoiseBase
diff --git a/library/include/ProceduralTextureModifiers.h b/library/include/ProceduralTextureModifiers.h
--- a/library/include/ProceduralTextureModifiers.h
+++ b/library/include/ProceduralTextureModifiers.h
@@ -32,6 +32,7 @@
#include "ProceduralPlatform.h"
#include <Ogre.h>
#include "ProceduralTextureBuffer.h"
+#include "ProceduralNoise.h"

namespace Procedural
{
diff --git a/samples/material/src/Material.cpp b/samples/material/src/Material.cpp
--- a/samples/material/src/Material.cpp
+++ b/samples/material/src/Material.cpp
@@ -29,7 +29,7 @@
#include "Material.h"
#include "Procedural.h"
#include "ProceduralUtils.h"
-#include "RTShaderSystem\OgreRTShaderSystem.h"
+#include "RTShaderSystem/OgreRTShaderSystem.h"

//-------------------------------------------------------------------------------------
void Sample_Material::createScene(void)

mikachu

16-01-2013 22:34:36

Thanks :D

I'm reinstalling Linux atm, will apply patch as soon as it's done.

EDIT : patch applied