Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 2D background with 3D objects on top

Author
Message
endre3000
15
Years of Service
User Offline
Joined: 20th May 2009
Location:
Posted: 21st May 2009 02:36
Hi everyone,

Hoping this is an easy question... I'm trying to draw a 2D parallax background (eg. Dark Invaders bg) with 3D rendered objects on top.

Using dbSprite(), I see the background fine but the 3D objects are hidden.

If I specify dbDrawToBack() or dbDrawSpritesFirst(), I only see my 3D renders and the blue background of the 3D camera, without the sprite background at all!

What am I doing wrong?

Thanks for your help!
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 21st May 2009 13:00
Maybe you could create a 3d game and make it look 2d by placing an object plane that covers the entire height and width of the screen, I don't know, just a thought.

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
endre3000
15
Years of Service
User Offline
Joined: 20th May 2009
Location:
Posted: 21st May 2009 17:20
Kklouzal, thanks for the suggestion. Yeah, thought about that also, but would be with less complications and more exacting for my purposes if I could just post multiple background layers with transparencies directly to screen coordinates. Seems like it would be a fairly simple thing to achieve, I know XNA can do exactly that... 2D background with 3D on top... I must just be doing something wrong.

Any more ideas out there?
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 21st May 2009 23:34
Disable the blue camera background by dbBackdropOff() command.
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 22nd May 2009 00:16
Whenever I call dbBackdropOff() it seems to make no apparent change. My sprite(s) do not show aswell..

I <3 C++ & Dark GDK 4 2 maek mai gamezorz! =D
endre3000
15
Years of Service
User Offline
Joined: 20th May 2009
Location:
Posted: 22nd May 2009 20:27
@ Mireben

Thanks, that seems to have totally worked for me.

Login to post a reply

Server time is: 2024-10-01 01:24:45
Your offset time is: 2024-10-01 01:24:45