Compile and run the first example of Ogre

Source: Internet
Author: User

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 ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.