forrestcupp
01-11-2006 21:41:46
I am a beginner at 3D programming, other than a small amount of knowledge of Managed DirectX. I understand C#, but I haven't learned C++, and I don't care to right now. As I look at the Ogre tutorials, I see that it is quite a bit different than C#. So what is the best way for me to learn Mogre? Is OgreDotNet close enough that I could use their tutorials?
If I'm going to take the time to learn to wade through the Ogre tutorials, I might as well learn C++ and just use it. That is not the way I want to go.
Bekas
01-11-2006 23:10:47
If I'm going to take the time to learn to wade through the Ogre tutorials, I might as well learn C++ and just use it. That is not the way I want to go.
I know C++ but I still went through all the trouble to get Ogre integrated in .NET because, for me, C# and .NET in general is a far more productive environment.
As I look at the Ogre tutorials, I see that it is quite a bit different than C#. So what is the best way for me to learn Mogre? Is OgreDotNet close enough that I could use their tutorials?
OgreDotNet is certainly closer but there are some differences. I would actually suggest getting a bit comfortable with C++ because the massive amount of tutorials, snippets etc. for Ogre are in C++, and knowing at least how you can convert them to C# is a great benefit. And remember that if you get stuck, there'll always be someone to give you a hand
forrestcupp
02-11-2006 01:48:35
I have noticed things like some places where C# uses a . C++ uses a ->
The thing that really throws me off is the naming differences. Like Ogre for c++ uses set and get in the naming, and Mogre doesn't. Is there an easy way to figure out these types of differences?
Bekas
02-11-2006 11:33:18
The thing that really throws me off is the naming differences. Like Ogre for c++ uses set and get in the naming, and Mogre doesn't. Is there an easy way to figure out these types of differences?
SceneManager::get/setAmbientLight gets converted to a propery, SceneManager.AmbientLight.
Intellisense is your friend; if you don't find the SetXXX method, look for the XXX property.
forrestcupp
02-11-2006 13:10:58
Thank you. That makes sense. I was looking through the Ogre tutorials, and I think I can make sense of most of it. Just one more thing right now, though. I noticed on some things where something starts with an m it gets changed to base. Like mSceneMgr is changed to base.SceneMgr. Is this the case with everything? I haven't looked very deeply yet, but so far these are the main differences I see. I guess with things like methods being changed to properties, I'll just have to learn by trial and error.
Bekas
02-11-2006 13:39:59
I noticed on some things where something starts with an m it gets changed to base. Like mSceneMgr is changed to base.SceneMgr. Is this the case with everything?
Ogre has a class ExampleApplication, that has code for initialization, input management etc. It's mainly used for the demos and for a quick way to get an Ogre app running; real world applications are likely to use custom code instead.
The equivelant in Mogre is the Mogre.Demo.ExampleApplication.dll. It has the same purpose and scope but has a few differences, for example it doesn't use Ogre's input but Managed DirectInput 1.1 (see
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=2602 for the justification), and the protected variables don't have the m prefix.
And speaking of converting C++ to C#, a major difference is that Ogre's add/removeListener methods get converted to .NET events. See
http://www.ogre3d.org/phpBB2addons/viewtopic.php?p=14223#14223, and
http://www.ogre3d.org/phpBB2/viewtopic.php?p=176449#176449 for more details.
Give me a few days and I'll have a chunk of the Ogre tutorials ported over to Mogre. They should be a good place to learn from.