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 / Help displaying image.

Author
Message
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 31st Dec 2004 08:41
HI i just got darkgame sdk, and i am trying ti display an image, i can display text but when i try doing an image it doesn't not show up. can any one help me out with this. code is posted below



http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
roujesky
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 31st Dec 2004 10:21
I suspect that the dbLoadImage() call could not find logo.bmp. Attached is your code slightly modified to load an simple image I know exists.

Kind of a pet peeve of mine that a whole lot of SDK calls are defined as void. Returning a status indicating it could not find/load the image would be polite.

BTW: a cleaner method is to use dbSetDir() to set the working directory to the image directory at the top of your app once and then you will have short file names rather than the long one I provided...

HTH
PearsoE
20
Years of Service
User Offline
Joined: 2nd Sep 2004
Location:
Posted: 31st Dec 2004 10:23
You code worked perfectly for me, the only way I could get it not to display the image was to relocate the image. The way your code is written logo.bmp must be in the same directory as your executable.

Are you able to sucessfully compile and run the samples provided?

Which compiler are you using and what version is it? Run dxdiag.exe, click "Save all information". You can save it as a .txt file. Attach that .txt file to your post, it will give people a good idea of the system you are running (cpu, memory, directx version, etc.).
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 31st Dec 2004 10:46
After i bit of looking around i see what was going on, i was trying the image in the folder with the exe but i was doing it from vc++ so it was setting the wrong folder as the working dir, instead of the folder with the exe it was setting the folder with the solution file.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com

Login to post a reply

Server time is: 2024-11-18 23:32:24
Your offset time is: 2024-11-18 23:32:24