After the OgreSDK_vc9_v1-7-2 is compiled, the built-in sample can be run .. Now you can write your own demo.
1. Create a consoleProgram: Ogreexample, add main. cpp.
2. copy the file of the new program to the: F: \ OgreSDK_vc9_v1-7-2 folder.
2. Start configuring properties of the project:
Working debugging directory F: \ OgreSDK_vc9_v1-7-2 \ ogreexample \ debug;
Additional include directories :.. \.. \ boost_000044 ;.. \.. \ include \ ogre ;.. \.. \ include ;.. \.. \ include \ ogre \ plugins \ pczscenemanager ;.. \.. \ include \ ogre \ plugins \ octreezone ;.. \.. \ include \ OIS ;.. \.. \ common \ include ;.. \.. \ include \ ogre \ rtshadersystem; Include
Linker -- General -- Additional library directories:
"F: \ OgreSDK_vc9_v1-7-2 \ Lib"; "F: \ OgreSDK_vc9_v1-7-2 \ boost_000044 \ Lib"
Linker -- input -- Additional dependencies:
Kernel32.lib user32.lib gdi32.lib winspool. lib shell32.lib ole32.lib oleaut32.lib UUID. lib comdlg32.lib advapi32.lib .. \.. \ Lib \ debug \ ogremain_d.lib .. \.. \ boost_000044 \ Lib \ libboost_thread-vc90-mt-gd-1_44.lib .. \.. \ boost_000044 \ Lib \ libboost_date_time-vc90-mt-gd-1_44.lib .. \.. \ Lib \ debug \ ogrertshadersystem_d.lib .. \.. \ Lib \ debug \ ois_d.lib
Copy from F: \ OgreSDK_vc9_v1-7-2 \ bin \ DEBUG directory
These DLL, cfg file added to the F: \ OgreSDK_vc9_v1-7-2 \ ogreexample \ DEBUG directory can be.
PS: I copied the configuration in the sample project that comes with ogre.
Example 1:
# Include "http://www.cnblogs.com/include/ogre/ExampleApplication.h" class myapplication: Public exampleapplication {public: void createscene () {ogre: entity * ent = mscenemgr-> createentity ("myentity", "Sinbad. mesh "); ogre: scenenode * node1 = mscenemgr-> createscenenode (" node1 "); node1-> setposition (10, 0, 0); mscenemgr-> getrootscenenode () -> addchild (node1); node1-> attachobject (ENT); ogre: entity * ent2 = mscenemgr-> createentity ("myentity2", "Sinbad. mesh "); ogre: scenenode * node2 = mscenemgr-> createscenenode (" node2 "); node2-> setposition (0, 10, 20 ); node1-> addchild (node2); node2-> attachobject (ent2); // mscenemgr-> getrootscenenode ()-> attachobject (ENT);} private :}; int main () {myapplication app; app. go (); Return 0 ;}