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 / Having trouble with dbDrawSpritesFirst()

Author
Message
2DWide
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 20th Jan 2011 05:17
I\'m experimenting with trying to get 2D sprites to be drawn BEHIND 3D objects. I have no problem getting 2D sprites to draw over 3D objects but I want the reverse. In the sample program below, I display a 3d object in the middle of the screen (a .X file) and an animated 2D sprite of a walking bear at the bottom of the screen. The two objects in this sample don\'t actually overlap at all so in theory both objects should be visible regardless of the order in which they are drawn. Both objects are visible if I use dbDrawSpritesLast(). But, when I use the call to dbDrawSpritesFirst(), the 2D sprite does not get drawn at all. What am I doing wrong or not understanding?

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 20th Jan 2011 13:07
not sure, but maybe dbSyncOn and dbSyncRate should be at the very beginning?

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th Jan 2011 23:59
Try dbBackDropOff() but remember to use dbCLS() first...

Warning! May contain Nuts!
2DWide
15
Years of Service
User Offline
Joined: 30th Nov 2008
Location:
Posted: 21st Jan 2011 01:19
WLGfx -

dbBackdropOff() did the trick! Thank you kindly.

Login to post a reply

Server time is: 2024-11-19 14:35:45
Your offset time is: 2024-11-19 14:35:45