Drawing 2D and 3D in the same scene
Drawing 2D and 3D in the same scene
I did took a look at the 2D graphics tutorial however I would like not to use sprites. I'm need 2D graphics for mouse cursor and other GUI controls Is there a way to use 3D objects and flatten them out with an Ortho projection?
You can use the addImage function of IGUIEnvironment for doing 2D interface graphics. It works quite well for things like HUDs.
You can use the draw2DImage function of IVideoDriver for the cursor. You need to use it after the GUI and scene have been drawn, but before everything is drawn on the screen, or else it will be drawn on top of.
As for doing all this with 3D instead of 2D images, I don't know. There might be a way to use render textures to do that.
You can use the draw2DImage function of IVideoDriver for the cursor. You need to use it after the GUI and scene have been drawn, but before everything is drawn on the screen, or else it will be drawn on top of.
As for doing all this with 3D instead of 2D images, I don't know. There might be a way to use render textures to do that.
Thanks!
addImage works pretty well, I like it better than using sprites. Ther's still a problem though: with AddImage you can't specify the depth (Z) of the image on the run, after you loaded the images.
[EDIT] Actually just noticed GUIImage has a BringtoFront method, I'll take a look see how that works.
addImage works pretty well, I like it better than using sprites. Ther's still a problem though: with AddImage you can't specify the depth (Z) of the image on the run, after you loaded the images.
[EDIT] Actually just noticed GUIImage has a BringtoFront method, I'll take a look see how that works.