Sample Code for extending the Ogre application with Equalizer

Source: Internet
Author: User

I just published the sample code for extending the Ogre application with Equalizer on Blogspot. Because equalizer was developed by foreigners, it was written in English and a little lame, change it to Chinese when you are free.
For more information about the examples, see my previous articles.

Eqogre is my test project for integrating ogre application with equalizer. You can get the executable files from here, and you can find some previews from my last post.

Features
1. simple ogre application integrated with equalizer.
2. Load ply file as mesh data.
3. interact by mouse and keyboard.
4. realtime textured shaddow for each mesh object.
5. Support multi-window, multi-channel, or cluster running by equalizer.
6. Just support windowxp by now.

Important
Because of Ogre's limitation, thread safeness is poor, so
1. Each node can only contain one pipe, that means you must change the config of 2-000000002d.eqc to use one pipe that contains tow windows.
2. There will be a blank window to be created automaticly, which is needed to initialize some OpenGL extensions by ogre.

What's needed
1. Ogre 1.4.4 for vc8
2. equalizer v0.4
3. Visual C ++ 8.0 with SP1.
4. ply files, you can find from http://graphics.stanford.edu/data/3Dscanrep/
5. eqogre source from http://www.esnips.com/doc/64e8e015-571f-41a2-9df4-12a4ce5f7274/eqOgre-full
For lower bandwidth, you can get just source from http://www.esnips.com/doc/25bfc7e4-624e-4a2c-a675-e7a146f4952e/eqOgre-source

How to build?
After prepared IDE and sdks, you can open the solution in './scripts' folder and build it.
Exacutable files will be outputed to './build/debug' or'./build/release 'as what configuration you choosed.

How to run?
If you just build with ogre 1.4.4 and equalizer 0.4, the result can run directly and skip these.
But if you want to change the exacuting directory or edit the code, I hope these wocould be helpful.

1. Copy these files from ogre's output directories to your executable directory.
For debug solution, you will need these files at least:

  • Ceguibase_d.dll
  • Ceguiexpatparser_d.dll
  • Ceguifalagardwrboard_d.dll
  • Ogreguirender_d.dll
  • Ogremain_d.dll
  • Ois_d.dll
  • Referenceapplayer_d.dll
  • Rendersystem_gl_d.dll


For release solution, you will need:

  • Ceguibase. dll
  • Ceguiexpatparser. dll
  • Ceguifalagardwrboard. dll
  • Ogreguirender. dll
  • Ogremain. dll
  • Ois. dll
  • Referenceapplayer. dll
  • Rendersystem_gl.dll


2. Copy these files from equalizer's output directories to your executable directory.
BTW, for both invocations, the files have the same names:

  • Equalizer. dll
  • Equalizerserver. dll
  • Pthreadvc2.dll


3. Move ply model files to the parent 'models' directory of your executable directory.
Ie. If './build/release' is your Executable Directory, your can copy the ply file
'./Build/models'
The Directory of ply files can be set in eqogrewindow: setupplymesh for each plymesh object, you can change that as you want.
The default model used in eqogre is 'rockerarm. ply', which cocould be found in equalizer's
Examples directory also.

4. If you have changed the executable directory, please check the Ogre config files are
Set correcttly, just as './build/debug/plugins. cfg', './build/debug/plugins. cfg', and
'./Common/*. cfg'

5. Now try to run eqogre.exe just like equalizer's eqply example.
Please try 'A/D/W/s' and arrow keys to move the camera, and draw the mouse to rotate the camera.

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.