09 August 2011

Another Move

While I was enjoying the way I had my programming set up, I found a few key flaws. The biggest reason I needed to switch environments again was the limitations of the computer's hardware. My Linux machine was put together over spring break because I was bored out of spare parts lying around the house. I have hit a few problems with its computational power already, particularly when Ubuntu upgraded to its new graphics interface which the computer could not handle. So it was little surprise that I would reach a point the computer no longer could handle building this program; I was just not expecting to have graphics issues with tutorial 2. For those interested tutorial 2 is shadow creation with multiple light sources, and the computer would render the 3D space, just the frame rate was only 10 fps or so. The other, lesser, problem I had was linker errors I was getting on tutorial 3. The tutorials are written from a Windows environment perspective - not surprising since most people run Windows and those new to programming would prefer the ease of Visual Studio and the executable file, etc. - which does not help when a file key configuration file needs to be edited, and I am unsure if the change will corrupt the system. (I have changed files in Windows which completely wiped the system, so I am wary of changing configuration files in section reserved for key operating system files.)

So that all lead to me moving from my Linux machine to my Windows computer, which has much better specs. For those interested in getting OGRE, I will briefly describe what needed to be done to get it to install, note I am not going to give details given in the OGRE tutorial, but key points I need to remember if I need to setup the engine again from scratch, focusing on where I had the most trouble. For Windows, start by installing a copy of Visual Studios and an recent version of the DirectX SDK. From the OGRE site, download the source files, the dependencies and the tutorial framework. Extract the source to the desired location, then unzip the other two downloads into the root file. Set an environmental variable for OGRE to the root folder (where you told it to install) and restart the computer. Open up the dependencies with Visual Studios and build the solution. Download and install CMake, set the location to search to the root folder and the build folder to a new folder (I added a folder called build inside the root folder). Once this is done, a whole series of files will be in the build folder including a file open able by Visual Studios, which can then be built. If all goes well, everything to this point has compiled without problem, and OGRE source has been successfully compiled.

Now for the hard part, setting up an blank project. After adding the files from the tutorial framework folder, the OGRE tutorial on their website starts to set up several solution properties. This took a very long time to get right since they use a previous version of OGRE while making the walk-through. The biggest problem is to make sure the folder added to include dependencies is actually the intended folder, most of mine required adding "OgreMain" of something else to get to point in the right spot. I will admit I skipped the post-compile command since it was giving me trouble and look extraneous (so far it has been). If everything has gone well, inside the Visual Studio's project folder there will be an executable, which will bring up a mostly black screen, it took me nearly a day to work all the errors out, which is why I am spending so much time recording what I did.

So far I have completed most of the first tutorial, which is not really that big for me since I have already done it on my Linux computer. To make it more interesting, I decided to make my own mesh, albeit a very crude mesh, to play with in the tutorial. The following is an actual screenshot from my tutorial executable.

While it is not much to look at, take is completely done from scratch, starting with the 3D rendering, which was then converted to mesh and added to the tutorial, instead of the OGRE head they call for which I had already done. Well, that is enough for this time I think, this post may be the most helpful yet, especially if I ever need to re-install the OGRE engine on my Windows computer.

~gunnah

No comments:

Post a Comment