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 / DarkSDN.Net Load Image from an embedded resource

Author
Message
Mudbug
18
Years of Service
User Offline
Joined: 2nd Nov 2006
Location: Rome, GA USA
Posted: 4th Nov 2006 21:41
Hi all. I have an image in project as an embedded resource. I can open a stream in C#/VB.net to this resource. How can I read it into a DGDKLib image?

Thanks!

-MudBug
Miguel Melo
19
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 5th Nov 2006 13:48 Edited at: 5th Nov 2006 13:49
I seriously doubt that can be done. I know that people tried something like that on the normal GDK and it didn't work out.

[edit] Not, unless you dump the resource into the Temp directory and load it from there.

I have vague plans for World Domination
Mudbug
18
Years of Service
User Offline
Joined: 2nd Nov 2006
Location: Rome, GA USA
Posted: 5th Nov 2006 14:00
Yeah, I thought about dumping it to a temp directory. Not nearly as neat, but it would do.

-MudBug
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 5th Nov 2006 14:02
I was planning on encrypting the media and then decrypting to a temporary directory and then loading from there and then delete the temp directory when the game exits. It's the best I can do without GDK being able to load from a stream or resource.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Nov 2006 19:48
cant a file be loaded as an embedded resource, or thru the resource tab of MyProject, then accessed as a file via the My class? Maybe I am not following what you guys are saying?

Ill test this if I have time later

jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 5th Nov 2006 20:03
CattleRustler, I think if you want to load an image for example, you need to use the oDBImage.LoadImage method which will only take a filepath AFAIK. So you cannot load an embeded resource unless you write it out to a temp directory first.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Nov 2006 21:39 Edited at: 5th Nov 2006 21:40
ah right, what was I thinking, lol.
apex needs to start adding complex object converters with nice fancy overloads (a,b,c,d etc..) to the dgdk methods muha

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 5th Nov 2006 21:52
Sheesh!

No seriously, I've not figured out how to manage resources yet, but it may be possible. I'll need to think on some..

Paul.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Nov 2006 22:56
That problem was solved by yours truly some time ago.

Feel free to swipe it and convert it:


It might be better to create an image and populate the DX texture directly - that was the step I never bothered to get to, but it should be easy enough, even if you need to convert to a different bit depth.

adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 6th Nov 2006 13:45
Loading images and sounds from your own custom formatted/compressed pack isn't that difficult, it's loading animated objects that's tricky. We've only got make mesh from memblock or whatever the SDK equivalent is, so you've instantly lost your animation. Since, as far as I know, append animation doesn't work, the whole process is made very difficult.

[center]
I'm superfly TNT
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Nov 2006 14:41
It may be possible to load DBO-based objects as resources, like I've managed to do with the latest addition to my utility plug-in set. To be honest, I've not used DGDK for a while so I'll need to check it out - if the SDK is like DBPro in certain aspects (which it should be), then it should be doable.

kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 21st Nov 2006 02:05
It would be great to load ANY KIND of files from stream, but I think Paul can't do much, that would have to be done in DGDK, by Lee and the others...

Login to post a reply

Server time is: 2024-11-19 09:28:53
Your offset time is: 2024-11-19 09:28:53