Page 1 of 1

Window Background for 2D applications

Posted: Thu Sep 27, 2007 2:47 pm
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

Posted: Thu Sep 27, 2007 2:52 pm
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.

Posted: Thu Sep 27, 2007 3:02 pm
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 ;)