Window Background for 2D applications

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Morgawr
Posts: 95
Joined: Wed Sep 26, 2007 7:04 pm

Window Background for 2D applications

Post by Morgawr »

So yeah, hi everyone it's me again with another question.. I'm such a newbie so I'm having problems again with my programming 2D application, I solved my sprite drawing but now another dilemma appeared.. How do I set a background as an image? I mean, I want a 2D background for my application like. I don't know, for example a forest..
If i have the .bmp/jpg/whatever image 800x600 (my application resolution) how do I put it on the screen? What function/class do I have to use? I tried looking in the APIs but couldn't really find anything useful..

thanks for the help
TomiZ
Posts: 40
Joined: Wed Aug 29, 2007 6:02 am
Location: Poland
Contact:

Post by TomiZ »

You can use draw2DImage and draw background like everything else in 2D. Just use big rect (0,0,800,600). And don't forget that it should be drawn before everything else, because 2D images don't use any Z order.
Morgawr
Posts: 95
Joined: Wed Sep 26, 2007 7:04 pm

Post by Morgawr »

TomiZ wrote:You can use draw2DImage and draw background like everything else in 2D. Just use big rect (0,0,800,600). And don't forget that it should be drawn before everything else, because 2D images don't use any Z order.
That actually works? wow I'll have to try it right now, I guess it'd save lots of time heheh
thanks ;)
Post Reply