Commits

Anonymous committed 5a5f7b6

init

  • Participants

Comments (0)

Files changed (6)

Debug/Plugins.cfg

+# Defines plugins to load
+
+# Define plugin folder
+PluginFolder=.
+
+# Define plugins
+Plugin=RenderSystem_Direct3D9_d
+Plugin=RenderSystem_GL_d
+Plugin=Plugin_ParticleFX_d
+Plugin=Plugin_BSPSceneManager_d
+Plugin=Plugin_OctreeSceneManager_d
+Plugin=Plugin_CgProgramManager_d
+
+
+Render System=OpenGL Rendering Subsystem
+
+[Direct3D9 Rendering Subsystem]
+Allow NVPerfHUD=No
+Anti aliasing=Level 4
+Floating-point mode=Fastest
+Full Screen=No
+Rendering Device=NVIDIA GeForce 8600 GT
+VSync=Yes
+Video Mode=800 x 600 @ 32-bit colour
+
+[OpenGL Rendering Subsystem]
+Colour Depth=32
+Display Frequency=N/A
+FSAA=0
+Full Screen=No
+RTT Preferred Mode=FBO
+VSync=Yes
+Video Mode=800 x 600

Debug/resources.cfg

+# Resource locations to be added to the 'boostrap' path
+# This also contains the minimum you need to use the Ogre example framework
+[Bootstrap]
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/OgreCore.zip
+
+# Resource locations to be added to the default path
+[General]
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/fonts
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/materials/programs
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/materials/scripts
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/materials/textures
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/models
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/overlays
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/particle
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/gui
+FileSystem=C:/libs/ogre-1.4.9/Samples/Media/DeferredShading/media
+FileSystem=../../MyGUI_Media
+FileSystem=C:/auralias_models/mesh
+
+
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/cubemap.zip
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/cubemapsJS.zip
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/dragon.zip
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/fresneldemo.zip
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/ogretestmap.zip
+Zip=C:/libs/ogre-1.4.9/Samples/Media/packs/skybox.zip

ogre-movingcube.sln

+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ogre-movingcube", "ogre-movingcube\ogre-movingcube.vcproj", "{66616D12-AD9C-42C9-8685-99CD59E7BEC3}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{66616D12-AD9C-42C9-8685-99CD59E7BEC3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{66616D12-AD9C-42C9-8685-99CD59E7BEC3}.Debug|Win32.Build.0 = Debug|Win32
+		{66616D12-AD9C-42C9-8685-99CD59E7BEC3}.Release|Win32.ActiveCfg = Release|Win32
+		{66616D12-AD9C-42C9-8685-99CD59E7BEC3}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

ogre-movingcube/ogre-movingcube.cpp

+#include "ExampleApplication.h"
+//#include <boost/interprocess/ipc/message_queue.hpp>
+
+class TutorialFrameListener : public ExampleFrameListener
+{
+public:
+	TutorialFrameListener(RenderWindow* win, Camera* cam, SceneManager *sceneMgr)
+		: ExampleFrameListener(win, cam, false, false)
+	{
+		// key and mouse state tracking
+		mMouseDown = false;
+		mToggle = 0.0;
+
+		// Populate the camera and scene manager containers
+		mCamNode = cam->getParentSceneNode();
+		mSceneMgr = sceneMgr;
+
+		// set the rotation and move speed
+		mRotate = 0.13;
+		mMove = 250;
+
+		
+		mq = new boost::interprocess::message_queue(boost::interprocess::open_only, "message_queue");
+	}
+
+	// Overriding the default processUnbufferedKeyInput so the key updates we define
+	// later on work as intended.
+	bool processUnbufferedKeyInput(const FrameEvent& evt)
+	{
+		return true;
+	}
+
+	// Overriding the default processUnbufferedMouseInput so the Mouse updates we define
+	// later on work as intended. 
+	bool processUnbufferedMouseInput(const FrameEvent& evt)
+	{
+		return true;
+	}
+
+	bool frameStarted(const FrameEvent &evt)
+	{
+		//mCamNode->getParentSceneNode()->yaw(Degree(1.0), SceneNode::TS_PARENT);
+		processMQEvents();
+
+		mMouse->capture();
+		mKeyboard->capture();
+
+		if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
+			return false;
+
+		return true;
+	}
+
+
+	//void processMQEvents()
+	//{
+	//	unsigned int priority;
+	//	std::size_t recvd_size;
+
+	//	int num = mq->get_num_msg();
+	//	
+	//	int number;
+	//	if(num > 0)
+	//	{
+	//		//for(int i = 0; i < 10; ++i)
+	//		//{
+	//		//	int number;
+	//		//	//number = buffer[i]
+	//		//	//mq->receive(&number, sizeof(number), recvd_size, priority);
+	//		//}
+	//		mq->receive(&number, sizeof(number), recvd_size, priority);
+	//		mCamNode->getParentSceneNode()->yaw(Degree(float(number)), SceneNode::TS_PARENT);
+	//	}
+	//	else
+	//	{
+	//		; //mCamNode->translate(Vector3(0, 10, 0));
+	//	}
+	}
+
+protected:
+	bool mMouseDown;       // Whether or not the left mouse button was down last frame
+	Real mToggle;          // The time left until next toggle
+	Real mRotate;          // The rotate constant
+	Real mMove;            // The movement constant
+	SceneManager *mSceneMgr;   // The current SceneManager
+	SceneNode *mCamNode;   // The SceneNode the camera is currently attached to
+
+	boost::interprocess::message_queue *mq;
+	char *mBuffer;
+};
+
+class TutorialApplication : public ExampleApplication
+{
+public:
+	TutorialApplication()
+	{
+	}
+
+	~TutorialApplication() 
+	{
+	}
+protected:
+	void createCamera(void)
+	{
+		// create camera, but leave at default position
+		mCamera = mSceneMgr->createCamera("PlayerCam"); 
+		mCamera->setNearClipDistance(5);
+	}
+
+	void createScene(void)
+	{
+		mSceneMgr->setAmbientLight(ColourValue(0.25, 0.25, 0.25));
+
+		Entity *ent = mSceneMgr->createEntity("Ninja", "cube.mesh");
+		SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode("NinjaNode", Vector3(0, 100, 0));
+		node->attachObject(ent);
+
+		Light *light = mSceneMgr->createLight("Light1");
+		light->setType(Light::LT_POINT);
+		light->setPosition(Vector3(250, 150, 250));
+		light->setDiffuseColour(ColourValue::White);
+		light->setSpecularColour(ColourValue::White);
+
+		// Create the scene node
+		SceneNode *yawnode = mSceneMgr->getRootSceneNode()->createChildSceneNode("YawCamNode1");
+		node = yawnode->createChildSceneNode("CamNode1", Vector3(-400, 200, 400));
+		node->yaw(Degree(-45));
+		node->attachObject(mCamera);
+
+		// create the second camera node
+		node = mSceneMgr->getRootSceneNode()->createChildSceneNode("CamNode2", Vector3(0, 200, 400));
+	}
+
+	void createFrameListener(void)
+	{
+		// Create the FrameListener
+		mFrameListener = new TutorialFrameListener(mWindow, mCamera, mSceneMgr);
+		mRoot->addFrameListener(mFrameListener);
+	}
+};
+
+#if OGRE_PLATFORM == PLATFORM_WIN32 || 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(Exception& e) {
+#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
+		MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
+#else
+		fprintf(stderr, "An exception has occurred: %s\n",
+			e.getFullDescription().c_str());
+#endif
+	}
+
+	return 0;
+}

ogre-movingcube/ogre-movingcube.vcproj

+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="ogre-movingcube"
+	ProjectGUID="{66616D12-AD9C-42C9-8685-99CD59E7BEC3}"
+	RootNamespace="ogremovingcube"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(BOOST_HOME)\&quot;;&quot;$(OGRE_HOME)\OgreMain\include&quot;;&quot;$(OGRE_HOME)\Dependencies\include&quot;;&quot;$(OGRE_HOME)\Samples\Common\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="OgreMain_d.lib OIS_d.lib OgreGUIRenderer_d.lib"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="&quot;$(BOOST_HOME)\stage\lib&quot;;&quot;$(OGRE_HOME)\lib&quot;;&quot;$(OGRE_HOME)\Dependencies\lib\Debug&quot;"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\ogre-movingcube.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>