Compile and use the OGRE engine with VC6 (full version)
Example Code Click to view this file
Original UI Power Korea http://www.uipower.com/ Please indicate the reprint address
Code download http://www.uipower.com/bbs/dispbbs.asp?boardid=24&id=225
OGRE is an open source packaged DirectX and OpenGL 3D engine
Why don't use VC6 without VC7, others don't know anyway, I think VC6 is fast than VC7, and the provincial resources.
download
The official homepage http://www.ogre3d.org/
Below is a domestic download connection
At least a file that needs to download
http://gd.91.com/temp/files/ogre/ogre.rar
http://gd.91.com/temp/files/ogre/dependencies/ogrewin32dependencies-0.13.0.zip
Http://gd.91.com/temp/files/ogre/dependencies/dependenciesstlportandcg.rar
installation
First decompress OGRE.rar to your favorite directory (I am put in E: / OGRESDK) and decompressed ogrewin32dendencies-0.13.0.0.zip and dependenciesstlportandcg.rar overwrites the "OGRENEW" directory to OGRE (I am E: / Ogresdk / Ogrenew)
Configure
Installation work completes the configuration
Tools-> Options-> Directories set (include)
1, D9 directory: (I am e: / dxsdk9 / include 2, ogre setting: (I am e: / ogresdk / ogrenew / ogremain / include) 3, extended: Support: (I am E: / Ogresdk / Ogrenew / Dependencies / include 4, STL: Support: (I am E: / ogresdk / grenew / dependencies / incrude / stlport)
Tools-> Options-> Directories set (lib)
1, D9 directory: (I am e: / dxsdk9 / lib) 2, OGRE setting: (I am e: / ogrenew / ogremain / lib / debug) 3, extended: Support: (I am E: / ogresdk / Ogrenew / dependencies / lib) 4, STL: Support: (I am E: / ogresdk / grenenew / dependencies / lib / debug)
Note: The above needs to be modified to your own address Debug is a test version, change to Release as a test version. In addition, the above directory sequence is absolutely do not miss if it will lead to inexplicable errors.
Compile
If your settings have no errors, you can open ogresdk / grenew / ogre.dsw to start compiling. (Will open N projects, compile time for at least 20 minutes [P4 1.7G, memory 512M, 120G 7200 turn, graphics card ... This is not related to the graphics card])
Note: Compile this project, but also open E: / OGRESDK / OGRENEW / PLUGINS / NATURESCENEMANAGER / SCRIPTS / PLUGIN_NATURESCENEMANAGER.DSP (My Contents) Compile this project (this is the natural plugin without him, you can't see the ground), etc. The end is completed.
If you have completed the completion, continue to watch otherwise go to http://www.uipower.com/bbs/index.asp message
test
Open E: /ogresdk/ogrenew/sample/bezierpatch/scripts/demo_bezierpatch.dsp (my path, your own change)
Compiled, run ... -> Debug-> Working Directory is set to the following directory E: / ogresdk / Ogrenew / Samples / Common / Bin / Debug (then, this is my directory yourself)
This is because all of the default demo projects are inherited from ExampleApplication. This defines the location of the directory (unhappy, the file will be modified to change the file to a favorite directory)
Set the path, continue, run ........ Can't find rendersystem_gl (maybe you have no appearance, anyway, I have encountered it, open the top of the resources.cfg, open plugins.cfg will contain Rendersystem_GL to remove the RENDERSYSTEM_GL This error is that OpenGL is not compiled, want to solve this problem to http://www.uipower.com/bbs/index.asp discussion)
Continue, run .... Finally, set the interface (although it is not good, it is not strong ... but it is best not to be blocked by BOSS. Otherwise, it is easy to play games), you can run after the setting is completed, should It is a triangular triangle that a mouse can operate.
Currently, there will be no problem (if you don't compile plugin_naturescenemanager.dsp, this will not find the plugin)
Making a minimum program (Hello World)
First of all, we must build a project (nonsense)
Create a Win32 empty project (don't make a mistake, not MFC)
Just called SimpleSt (this article is loaded in www.uipower.com)
Open Projects-> Settings
Open C / C -> Code Generation
Change Use Run-Time Library for Debug Multithreaded DLL
Add / ZM500 in the Project Options below (this I didn't find it in the options, I can only add)
Open Link-> INPUT
Add OGREMAIN_D.LIB to lib, add libcmt or libracmtd (you try to try with libcmt, if you don't change to libcmtd)
Ok, set it, compile it.
If you set it correctly to compile
The following replica has a DLL to your project catalog (last, this is my directory, your own) is of course, your own procedure is not necessarily All libraries are used.
Copy resources.cfg to your project, and empty (note that just to this example) Copy Terrain.cfg to your engineering copy plugins.cfg to your project
Can now run (pop up that dialog, then one, cyan window)
Note:
The basic compilation and operation process is above, welcome to http://www.uipower.com/ for communication. Original UI power
http://www.uipower.com/
Please indicate the reprint address