Alternative Languages        
Print

C++ is the first language you think of when you start reading about OGRE, since that's what it is written in, and most of the content on this wiki deals with C++. However, there are a few alternative languages that you might be interested to hear you can also use with OGRE. This page will serve as a quick introduction to the reasons you might want to change from C++, and will also mention a little about each language.

Here are quick links to the pages of the different wrappers:

  • MOGRE for .NET (VB, C#, Delphi, Boo)

 

Why use something else?

Why use C++? The #1 reason to use C++ is that it produces fast code. A graphics engine requires a lot of speed, because it needs to handle a tremendous amount of data as fast as it possibly can. So, C++ is a great choice for, in this case, OGRE. But, C++ requires a lot of the programmer. A lot of things have to be considered by the programmer at all times, things that aren't there in other languages because they are designed differently. The result of this is that programming in C++ can be a lot less productive than choosing a programming language that isn't necessarily so focused on speed, but rather focused on giving the programmer as many tools as he or she needs to be more efficient.

"How big can the difference between languages be?", you ask. Big! But I'll leave that up to you to find out... :-)

How does it work?

There are two ways to convert OGRE to other languages. The first is to write a port of OGRE, which basically means that you rewrite OGRE entirely in another language.

The second option is to make a wrapper. A wrapper can be described as an additional layer written in the new language, and when you call an OGRE method, the wrapper "forwards" the call to the real C++ method. This of course means that it is slightly slower to use a wrapper than to use C++ directly, but remember that it's only slower to make the actual calls; the code that gets executed is still written in C++ so you get most of the speed. Especially when you consider that you usually don't have to make that many calls to OGRE (most are for setting up the scene). There is more information on wrappers in the OgreNet page.

Of course, you don't have to convert OGRE at all - it's already done for the languages mentioned!

.NET

MOGRE
MOGRE (Managed OGRE)

 
.NET isn't really a language; It is family of languages.* C# ("C Sharp" or "C Pound" depending on who you ask) is a lot like Java in structure and usage, but with some additional concepts of C++. The misconception about C# is that it's a "new version of C++". Other then syntax, the two are nothing alike.

  • Visual Basic (VB.NET). This one gets a lot of flak due to the (deservedly) poor reputation of previous versions of Visual Basic (VB4, VB5, VB6, etc...). It is important to understand that VB.NET is a completely different language than its predecessors. It is just as fast as C# and only slightly less powerful (no operator overloading and less stringent type safety), but easier to use for the developer due to very nice auto formatting, auto-complete, and overload listings as you type. As with C# in regard to C++, the only thing VB.NET holds in common with previous Visual Basic incarnations is the syntax.
  • Delphi. Designed by the same architect who engineered C#, Delphi shares many traits with C#, but is argued to use a somewhat friendlier syntax.

 
If you want to use one of the .NET languages, check out MOGRE (Managed OGRE).


Contributors to this page: edoardo782 points  , OgreWikiBot54 points  , jjjet4242 points  , jacmoe180265 points  , bvanevery2666 points  , Beauty14565 points  and andy735 points  .
Page last modified on Tuesday 04 of February, 2014 10:50:15 UTC by edoardo782 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.