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.

DarkBASIC Professional Discussion / OK DB wizards..... screen capture!

Author
Message
fatbiffa
23
Years of Service
User Offline
Joined: 15th Jan 2003
Location:
Posted: 16th Apr 2003 17:11
If there anyway to do a screengrab from within a DBPro exe?

eg. press a key and everything on screen - text, sprites, 3d objects
is held in memory so it can be saved and reloaded at a later date, or used as a texture on an object?

I haven't the faintest clue how to do this!
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Apr 2003 17:20
get image imgnum,0,0,screen width(),screen height()


will capture the whole screen to whatever u define the imgnum variable to.

Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 16th Apr 2003 17:23
You're asking for three different things here.

1) How to screen grab from a running DBPro program.
2) How to save the current screen into memory.
3) How to save the current screen as an image for use as a texture.

For 1 - just press the PtrScrn button on your keyboard while the program is running! (maybe need to use shift too) or use a utility like MWSnap (free) or HypersnapDX ($30). This will grab the screen into the clipboard where you can paste it into a paint package.

For 2 - best bet would be to use the pixel locking technique, read the current display into a memblock and then save it out. Not particularly fast, but possible.

For 3 - you can't save images out without the use of a 3rd party DLL at the moment, I believe there is one on the RGT site.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
GameKit
23
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 16th Apr 2003 17:23
you can then save it to a file and have your program load it later.

Anyone Can Destroy...But Few Can Create...
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 16th Apr 2003 17:27
Indi - that too

"Gentlemen, we are about to short-circuit the Universe!"
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Apr 2003 17:39
fatbiffa
23
Years of Service
User Offline
Joined: 15th Jan 2003
Location:
Posted: 16th Apr 2003 18:04
Indi scores top marks for simplicity and functionality - that works a treat my man!

cheers folks ?

The Darthster
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 17th Apr 2003 01:57
I'm sure there was a save bitmap command somewhere... found it in the DBC help files. Why isn't this supported in DBPro?

Also there's some sort of set camera to image command, which took ages to get to work properly, but I managed a fairly good demo, cubes flying everywhere textured with real-time camera images, unfortunately I've lost it. I'll try and make it again, and stuff it into 20 lines.

Once I was but the learner,
now, I am the Master.

Login to post a reply

Server time is: 2026-07-10 19:47:36
Your offset time is: 2026-07-10 19:47:36