<html><head> <STYLE TYPE="text/css"> <!-- .MainHeader { font-weight: bold; color: #FFFF33; background-color: #006600; font-size: 10pt} body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #CCFFCC; background-color: #003300} .BorderHeader { background-color: #999900; font-size: 8pt; font-weight: bold; color: #333300; text-align: center} .MainContent { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #CCFFCC } .BorderContent { font-size: 8pt; color: #66CC33; border-color: black #666600 #666600; padding-top: 2px; padding-right: 2px; padding-bottom: 10px; padding-left: 2px; margin-bottom: 2px; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:link { color: #FFFF00; text-decoration: underline} a:hover { color: #FFFFFF; text-decoration: underline} a:visited { color: #FFCC66; text-decoration: underline} li { color: #66CC33; list-style-type: circle; position: relative; left: -15px; clip: rect( )} .NewsDate { color: #CCFFCC; font-weight: bold} td { font-size: 10pt} th { font-size: 10pt} .Annotation { font-size: 10px} H1 { text-align: center; } A.qindex {} A.qindexRef {} A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } DL.el { margin-left: -1cm } DIV.fragment { width: 100%; border: none; background-color: #003300 } DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } TD.md { background-color: #006600 } DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } FONT.keywordtype { color: #999920 } FONT.keywordflow { color: #e0FF00 } FONT.comment { color: #009900 } FONT.preprocessor { color: #809020 } FONT.stringliteral { color: #002080 } FONT.charliteral { color: #008080 } H3 { FONT-FAMILY: trebuchet ms,helvetica,arial } .ex { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } CODE.keywordtype { COLOR: #00ccff } CODE.keyword { FONT-WEIGHT: bold; COLOR: #00ccff } CODE.fn { COLOR: white; FONT-WEIGHT: bold; } CODE.var { COLOR: #dcdcdc; } CODE.macro { COLOR: #809020; FONT-WEIGHT: bold; } CODE.comm { COLOR: lime } CODE.num { COLOR: purple } CODE.str { COLOR: #ffcc33; font-style: italic } .SectionHeader { font-size: 14px; color: #FFFFCC; font-weight: bold} .header { font-size: 16px; font-weight: bold; color: #FFFFCC} --> </STYLE> <title> Copying the sample sources </title> </head> <body bgcolor="#FFFFFF" text="#000000"> <p align="center" class="header">OGRE (Object-Oriented Graphics Rendering Engine)</p><p align="center" class="header"> Copying the sample sources</p><p align="left" class="MainHeader"> </p><p>This step is the same whether you're using the 'easy' or the 'advanced' way. </p><p>In summary: <UL><LI>Copy <a href="SampleApp.cpp" TARGET="_blank">SampleApp.cpp</A> from this folder into your application folder, and rename it to reflect your application's name.</LI></UL><P></p><p> And now in more detail: OGRE comes with a useful set of classes for getting applications up and running, called 'ExampleApplication' and 'ExampleFrameListener'. These classes basically boot the OGRE system, set up all the usual stuff like displaying a configuration dialog and creating a window, sets up a camera and make it responds to the standard mouselook & WSAD controls, and just basically make your life easy. All you have to do to create your application is to subclass these classes to customise the behaviour where you want.</p><p>And hey, to make it even easier, I've created a sample subclass which you can use as a template. In the same folder as this tutorial is a file called 'SampleApp.cpp', which you can just copy into your application folder, rename, and fill in the blanks. As your project gets bigger you will want to split things up into more files, but for simplicity I've included it all in one file for the moment (since excluding comments it's less than a page of code anyway). </p><p> All you <i>have</i> to do is to fill in the 'createScene' implementation. If you want to do more advanced things like adding extra controls, choosing a different scene manager, setting up different resource locations etc you will need to override more methods of ExampleApplication and maybe introduce a subclass of ExampleFrameListener. You can look at the other tutorials and the sample applications provided with OGRE to see how this is done. </p><TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="0"> <TR> <TD WIDTH="14%"><A HREF="index.html">Back to Index</A></TD><TD WIDTH="39%"> </TD><TD WIDTH="22%"><a href="createfolder.html"><< Previous section</a></TD><TD WIDTH="25%"><a href="createproject.html">Next section >></a></TD></TR> </TABLE><P CLASS="MainHeader"> </P> </body> </html>