gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > 2D above 3D (e.g. a HUD)

#108313 - silent_code - Tue Nov 07, 2006 7:20 pm

hi there!

i'm trying to get a 2d bg over my 3d stuff... like a hud, you know.
as usually, just 2d/3d is easy, but try to have them both and you feel really dumb.

so, can anyone possibly point me to a topic or tell me how it works? i know it's supposed to work, but whatever i try, i will only see 3d. :(

thanks!

#108315 - DekuTree64 - Tue Nov 07, 2006 7:38 pm

The 2D stuff is probably displaying fine, just hidden behind the 3D layer. It just so happens that BG0 is the 3D layer though, so you can set the priority of it like any other BG.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#108328 - silent_code - Tue Nov 07, 2006 8:43 pm

i've tried that already.

i use dualis for testing, as neoflash won't work with my amd pc... :C (to test on hw i have to go to some buddy and use his pc...)
seems to be a driver bug or something... sorry, that was kinda offtopic.

i don't know if dualis is causing the problem, because e.g. it breaks my 4bit sprites, but with other emus and on hw everything works fine... but other emus don't have that much support and dualis is still the best emu for 3D. can anyone confirm dualis is breaking such stuff?

i know the 3D stuff is fine on hw, the only thing i couldn't test is the overlay. by knowing how to do it i could just assume it works and continue working on other stuff... that's why i asked in the first place.

[kids, that's bad writing, because every paragraph (and nearly every sentence) starts with "i"!]

sorry for any confusion i may have created... neeeeed sleeeeeep. ;)

#108330 - Sausage Boy - Tue Nov 07, 2006 9:09 pm

Emulators usually have a problem with 2D over 3D.

You could consider using 3d quads for your hud, which would give you features like semi transparent pixels.
_________________
"no offense, but this is the gayest game ever"

#108407 - silent_code - Wed Nov 08, 2006 3:41 pm

yes, i thought about that, too. it's the way i'm used to do it, but bgs come for free, where as 3d quads use up some tri and vertex memory. it's just like two tris or a quad (i tend to use tris) and a texture (for a simple screen overlay), but i'd really prefer using a bg.

thanks for the answer, though!