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 / How does 'Set camera to image' behave?

Author
Message
Juso
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 29th Mar 2003 21:08
Whats wrong with this simple command:

Set camera to image 0,1,100,100

It always gives error 'Cannot grab image due to an illegal area'. No matter what camera or what image number or what area size I use. Should I prepare the image somehow before grabbing?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Mar 2003 21:13
The last two parameters MUST be a power of 2:

Eg:

1,1
2,2
...
512,512

This was set in Patch 1.

SET CAMERA TO IMAGE 0,1,256,256 would be OK.

Current Project: Retro Compo. Entry.
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Mar 2003 21:15
2x2
4x4
8x8
16x16
32x32
64x64
128x128
256x256
512x512
1024x1024
2048x2048

and so on

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Mar 2003 21:16
But a limit of 512,512 is suggested, large textures cause huge slowdown.

Current Project: Retro Compo. Entry.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Mar 2003 21:20
maybe this example will explain some stuff



Juso
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 29th Mar 2003 21:39
Thanks for speedy answers. It gives no more errors but it halts the screen totally after grabbing
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Mar 2003 22:59
Remember that it does not "grab the screen". YOU ONLY CALL IT ONCE, you don't need to call it every frame, just at the start of your program.

Current Project: Retro Compo. Entry.

Login to post a reply

Server time is: 2026-07-11 14:36:42
Your offset time is: 2026-07-11 14:36:42