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 / multiple cameras

Author
Message
Sephnroth
20
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 22nd May 2005 01:37
hey again,

are multiple cameras working correctly in darksdk 1.0? either they are broken or i am doing something wrong. I wanted to make a second camera (camera 1) and set it to output to an image. the problem is that when I make a new camera it completly overwrites camera 0 on the screen. I cannot see any "hide camera" or simular commands to prevent this. I have tried dbSetCurrentCamera(0) but that has no effect.

The only thing I found is changing the camera viewport. But if i set it to all 0's then sure enough i will be able to see camera 0 again, but of course the image that i have set the camera to will now be empty and usless.

check out this example code i have been testing with:



there should be a cube spinning on screen and in the top left a 10x10 copy of the spinning cube. comment out the set camera viewport and you will loose camera 0's view port.

What is also interesting is try setting the left and top parameters of the camera viewport to 70 or something (the first two 0's) - for me the entire screen gos green with a view blue lines through it if i do that, charming!

Now, am i just thinking about everything wrong and doing it all stupidly? Or is this a bug? if its a bug was it fixed in 1.1? if so i may be forced to upgrade.. but i REALLY want my collision commands too -_-

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 22nd May 2005 06:07
Well, in 1.1, that code crashes (and you get nothing but a black screen). Having not used camera to image, I dont know whether your code is actually correct or not though.

Smithy
18
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 23rd May 2005 03:38
Hmm,... probably the code crashes because the image doesn't exist at that point?
(I assume that image should be created and assigned to an object (as a texture) in order to render the camera-output to that image)

Just a thought,
smithy

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++ 6.0; Delphi; ADSL;
Sephnroth
20
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 23rd May 2005 03:47
well I dont get a crash, it works here except for the problem of camera 1 covering camera 2 unless the viewport is tiny.

There is no "create image" function that im aware of. I can load an image first but that makes no differance (tried it). Thats why SetCameraToImage() takes a width and height parameter, the dimensions of the image it should create.

Well if no one knows how to fix this im buggered. I keep running into little bugs with stuff and im like ohwell, i'll just move onto the next bit until they patch it, its still young. But i now have like 5/6 sections of code that are waiting for a bug fix before they are usuable. I even had to rewrite one function to do with files to use a checklist because findfirst causes a unresolved external error (so function the library doesnt exist or has different name to header) - im really trying not to complain because im really thankful for the darksdk, its awesome and im greatful i can even use it. But im running out of things in my program that I can actually work on..

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd May 2005 17:54
Use the Windows FindFirst command instead - probably would be quicker anyway.

Visit http://homepages.nildram.co.uk/~nickk
AtomZ - Only for Intel compatible computers.
Smithy
18
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 23rd May 2005 23:51
@Sephnroth
Thanks for clarification,...
Well,.. that was my only thought, and as I have 1.1 I can't help you.



@Bouncy Brick
Good suggestion. I think the dgSDK one's are just wrappers anyway,
so its probably faster to call them "directly".

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++ 6.0; Delphi; ADSL;
Artus
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: France
Posted: 25th May 2005 04:01
No time to test tonight, but would assigning the image to a plane (eventually locked on screen) help ?
Sephnroth
20
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 25th May 2005 05:25
afraid not, which is ironic because the image is ultimatly going to be forcfully copied to another image which WILL be on a locked plain. But the problem here to start with is i cant make multiple cameras without camera 0 being either obscured or corrupted. If i delete camera 1 then i get camera 0 back but I appear to loose my image data from that camera..

either its a bug or I completly misunderstand the technique you are supposed to use

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 2nd Jun 2005 21:33
Try 1.1.1 - I believe its working now.

Login to post a reply

Server time is: 2023-02-06 19:38:07
Your offset time is: 2023-02-06 19:38:07