You may want to update DarkBasic Professional. I’m using DBPro version 7.4. Your version may be older then that. It is my understanding that Texture Backdrop has been re-implemented. However, Scroll Backdrop is still obsolete.
In programming there are always alternative methods of achieving a goal. Programming is also give and take. To solve one problem may cause others if your not fully aware of some of the basic functions and how they behave. In the last snippet I will show another method using a sprite. But, first let us cover some of the basic functions.
In the final snippet we'll set the sprite to be drawn first with Draw Sprites First, this will allow are text to be shown on top of the sprite. However, this will also cause the sprite not to be shown. So, we’ll need to turn the Backdrop Off. Let’s see how turning the backdrop off will normally affect 3-D objects in the scene.
sync on
sync rate 60
backdrop off
autocam off
position camera 0, 0, -100
make object cube 1, 20
do
set cursor 0, 0
print "Notice the smearing of the object as it rotates."
sync
yrotate object 1, wrapvalue(object angle y(1)+1)
loop
Notice how the object smears as it rotates. How do we fix this? In this particular case we need to change Set Cursor to CLS and we’ll also need to set all 2-D activity so it draws first with Draw To Back.
sync on
sync rate 60
backdrop off
autocam off
position camera 0, 0, -100
make object cube 1, 20
draw to back
do
cls
print "Notice the object no longer smears."
sync
yrotate object 1, wrapvalue(object angle y(1)+1)
loop
This snippet is just one way to achieve the same affect. The image I used is attached to this post. Notice the fix to the object smearing is not used here. The sprite is being used to clear the screen.
u as float
v as float
sync on
sync rate 60
backdrop off
autocam off
position camera 0, 0, -100
load image "road.dds", 1
sprite 1, 0, 0, 1
make object cube 1, 20
draw sprites first
u = 0
v = 0
do
set cursor 0, 0
print "Use arrow keys to scroll backdrop."
sync
yrotate object 1, wrapvalue(object angle y(1)+1)
set sprite texture coord 1, 0, u, v
set sprite texture coord 1, 1, u+1, v
set sprite texture coord 1, 2, u, v+1
set sprite texture coord 1, 3, u+1, v+1
u = u + (rightkey()-leftkey())*0.01
v = v + (downkey()-upkey())*0.01
loop
Well, I hope you found this helpful.