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.

Newcomers DBPro Corner / 3D object with backdrop off

Author
Message
Stoneygup
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location:
Posted: 30th Sep 2004 04:03
Hi, I'm obviously very new to Darkbasic and this is my first attempt at loading up one of the sample 3D models that's included. Best way to explain this is, think of a beginning screen in a RPG where you set up a character, I want the 3D model to be visible and turn but I also want to be able to display text and other bitmaps and whatnot. So, I turned of the backdrop off. What is happening is that everything shows up 'OK' but the model doesn't refresh properly, when it rotates 'old' versions of the model continue to show. This obviously doesn't happen when the backdrop is on.
I know this isn't the most clear explanation but I'll try to boil it down a little bit.
1. How can I 'refresh' the image properly with the backdrop off?
and/or
2. Can I put bitmaps/text/other images on the screen when the background is on?
Thanks for the time and help.
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 30th Sep 2004 11:19 Edited at: 30th Sep 2004 11:21


Your code didn't show up. "Error obtaining Source Code, invalid ID. Sorry but I've given up." Try using the
code tags instead of the source attachments.

The only thing i can think of is the sync commands. Did you turn on sync, and are you syncing in your main loop?

I'll try to look at your code if you repost it. ^_^
Stoneygup
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location:
Posted: 30th Sep 2004 23:16
Oy, sorry about that. let me try to put it in the message itself. I am trying to manually sync it, but of course I could be using it incorrectly. I *HOPE* the code gets in there correctly this time.
backdrop off
sync on
irotate = 3
sync
do
load object "L-Tech-Static.x",1
position object 1, 10, 0, 0
scale object 1, 400, 400, 500
rotate object 1, 0, iRotate, 0
sync
irotate = irotate + 3
if irotate > 360
irotate = 3
endif
loop
delete object 1
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 30th Sep 2004 23:19 Edited at: 30th Sep 2004 23:23
Final Epsilon is right, you need to learn to use the sync command in you loops. The syncronize commands allow your computer to refresh everything at the same time. Without using sync the screen will refresh after every command... Here is an example of sync vs. non-sync...



That should show you how sync improves your programs and how it is used...

Well... I hope I helped...

[Edit]
The code you posted above will not work correctly, try this instead...



The computer isn't an addiction, its more of a mental and social dependancy.
Stoneygup
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location:
Posted: 1st Oct 2004 00:07
Aha, Thanks so much guys. I really appreciate it.
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 1st Oct 2004 00:48
If you turn the backdrop off you gotta clear the previous frames graphics manualy.
Look a the command CLEAR CAMERA VIEW. I think that may help.


The word "Gullible" cannot be found in any English Dictionary.

Login to post a reply

Server time is: 2024-09-23 01:24:54
Your offset time is: 2024-09-23 01:24:54