Using 3d and 2d together

Post Reply
dhjohn
Posts: 2
Joined: Wed Jul 01, 2009 11:38 pm

Using 3d and 2d together

Post by dhjohn » Wed Jul 01, 2009 11:54 pm

I am rather new to ds programming, so please excuse me if this is a newbish question, but can you use both the ds's 2d and 3d graphics on the same screen? (On different backgrounds I assume)
I ask because from what I've looked at, the top most background is used for 3d, and I was wandering if 2d sprites can be drawn above the 3d background (for life bar, score counters, ect.), or if you have to use textured quads for it?

Thanks in advance for any help you can give.

WinterMute
Site Admin
Posts: 2003
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Using 3d and 2d together

Post by WinterMute » Thu Jul 02, 2009 3:31 am

Yes, you just need to change the priorities on the 2D elements so they show above the 3D. There's a mixed 3D & 2D text example distributed with the toolchain
Help keep devkitPro toolchains free, Donate today

Personal Blog

dhjohn
Posts: 2
Joined: Wed Jul 01, 2009 11:38 pm

Re: Using 3d and 2d together

Post by dhjohn » Thu Jul 02, 2009 3:44 am

Ah. Thank you.

weirdfox
Posts: 29
Joined: Thu Feb 19, 2009 8:45 am
Location: Montreal, Canada
Contact:

Re: Using 3d and 2d together

Post by weirdfox » Fri Jul 10, 2009 3:26 pm

You can also stay in 3D mode and use it to render your 2D :
http://www.opengl.org/resources/faq/tec ... ations.htm

Look at the "9.030 How do I draw 2D controls over my 3D rendering?" section :)

The only tricky part is to disable the depth buffer...
try, crash, debug and learn :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests