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 / DarkGDK won't make memblock from image

Author
Message
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 20th Feb 2011 21:27
Hello again, I'm back with what seems to be a bug with DarkGDK but might just be with my code.

Here's some memblock manipulation code I've written:


And whenever I use a break point within the function(all of the code is in a setup function for one of my classes) the variable memExist always equals 0. I've tried using .png instead of .dds and I've loaded it as a pixel-perfect image instead of a texture. DarkGDK will not make the memblock.

Any idea why? I've attached "ews_test.dds" if you need it.


Attachments

Login to view attachments
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 21st Feb 2011 21:51
The ID number is too high. If I try with _ews_imgID = 1, 11, or 111, it creates the memblock. With 1001 the memblock is not created.

By the way, even when the memblock is created, I cannot convert the memblock back to an image because the resulting image is totally black. It works if I try with a bmp file instead of dds.
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 22nd Feb 2011 02:25 Edited at: 22nd Feb 2011 03:43
Thanks Mireben, guess Lee didn't think anyone would make 1001 memblocks, huh? I'll see if the image being black on conversion would have anything to do with the format the DDS image was in(DXT1).

EDIT: Well I seemed to fix the issue with the black image(had the memblock id and image id mixed up), but now I can't get dbMakeImageFromMemblock to not throw a runtime error.

The error:Run-Time Check Failure #3 - The variable 'd3dformat' is being used without being initialized.

I've looked at the DarkSDK source code to 'dbMakeImageFromMemblock' and there isn't even a variable named 'd3dformat' defined in it at all. I'm at a loss for what could be causing this.

Any help would be greatly appreciated(again!).


Login to post a reply

Server time is: 2024-11-19 12:18:41
Your offset time is: 2024-11-19 12:18:41