CaelumSharp is a port of Caelum to C# targeting Mogre by user Smiley80.
Supported Mogre version: 1.7.x (also older ones)
Forum:
Use this thread.
Download:
CaelumSharp (based on Caelum 0.5)
It contains source, media and demo application.
Differences
Differences to the original Caelum:
- changed methods to properties where appropriate
- renamed enums, constants and methods to meet .NET naming conventions
- an other parsing method for config files (using regular expressions)
- still compatible to files of original Caelum
- only imports and variables aren't supported (maybe later)
Usage
Preparation
- download + extract zip file
- open CaelumSharp.sln with Visual Studio (or Visual C# 2008)
- build project
- copy CaelumSharp.dll to your project
- add a link to the file
- copy needed media files to you project
Your application needs to load the CgProgramManager plugin.
This you can enable in the file plugins.cfg by adding this line:
Plugin=Plugin_CgProgramManager
Code
Start CaelumSharp with the default settings:
using CaelumSharp;
CaelumSystem cs = new CaelumSharp.CaelumSystem(root, sceneMgr, CaelumSystem.CaelumComponent.Default); cs.AttachViewport(this.viewport); window.PreViewportUpdate += cs.PreViewportUpdate; root.FrameStarted += cs.FrameStarted;
Create a system from script:
CaelumScript.Singleton.Initialise(); CaelumSystem cs = new CaelumSystem(root, sceneMgr, CaelumSystem.CaelumComponent.None); CaelumScript.Singleton.LoadCaelumSystemFromScript(cs, "DefaultSky");
An other example code you find here.
See also
- Caelum
- SkyX Wrapper for MOGRE - An alternative sky simulation