How do I draw 2D graphics in Mogre? Like, say, a HUD?
The HUD, short for Head-Up Display, is the method by which information is visually relayed to the player in computer and video games. Gaming developers often erroneously refer to the HUD as the "Heads Up Display" possibly based on the expression "Heads Up!" to call attention to an incoming projectile. The HUD can be an important part of a game's user interface.
Taking its name from the real-life version, the HUD is frequently used to simultaneously display several pieces of information including the main character's health, items, and an indication of game progression (such as score or level).
I don't need a gui system, I need a way to draw sprites...
I also would need something like this for display of the cardinal point for a compass.
This is possible using overlays (basic 2D objects). There you integrate a material. The material file refers to a picture file of a ghost.
A GUI system works similar work like this and could be used for that, too. (ok, instead of overlays a gui system also could based to 3D objects)
So the theory - in practice I found no ready solution for Mogre and have still not enough knowledge to do it myself.
Search in the forum or wiki for "overlay" Ogre code and try to port it. Maybe there is also running example code for Mogre or OgreDotNet. If you installed the program Tortoise you can get all the sources from CVS or subversion system including examples.
An other way is to build / import a 3D ghost mesh. Then add a SceneNode to the SceneNode of the current Camera. On this you can add the ghost entity. By changing the position and scale you can put it into a screen corner. When you move the camera the ghost should be fixed at this position (as long as you don't change the aspect ratio or camera settings of the viewport).
Sorry, more I can't help. But if you get a solution with overlay, I would be happy if you post the code.
Additionally here is a snippit how to get the viewport/screen position
of a point in 3D space. This could be needfull for your HUD.
If somebody port it to Mogre, please post it (or write a message to me) and I will add it into the Forum.
(this simple code I could port, but I'm to lazy
I heard of something called Ogre Magic, designed to make it eaasier to make 2D graphics with Ogre. I guess it's not available for Mogre though...
Can I see a link to Ogre Magic? This looks interesting....