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 / DDS and Bitmap Question.

Author
Message
haliop
User Banned
Posted: 3rd Sep 2008 18:25
hello everyone.

so i've created a BOX , and a texture of 512.512 to texture it.
this is the code
//
int GridBox = 1;
int GridImage = 1;
void GridSystem( void )
{
dbMakeObjectBox(GridBox,(dbScreenWidth()),800,3);
dbLoadImage("GridTexture.dds",GridImage);
dbTextureObject (GridBox,GridImage );
}
//
so when i ran my program the box appears but no texture.
i'm Using adobe PhotoShop to do the textures.

now i have tried also with a Bitmap BMP , and it didn't show.
i don't know whats wrong.
mybe i'm using a diffrent variation of varibles when exporting from PhotoShop then GDK can't recognize it , altough i'm using the original defaults.

what am i doing wrong?

ty for your time
and have an awesome day.
haliop
User Banned
Posted: 3rd Sep 2008 19:46
so.. no one can answer this?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Sep 2008 19:48
first make sure that the dds file you are exporting from ps is a valid dds file. try png and check if it makes any difference.

also check that the dds file is in the same path/directory of the exe
haliop
User Banned
Posted: 3rd Sep 2008 20:31
cool thnx
if i add // i can make the image in another directory right?
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 4th Sep 2008 02:18
haliop - Give people a chance to see your post... some are sitting in US, some in Brazil and some in Denmark...

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 4th Sep 2008 07:39
@haliop .. yes you can use "\\" symbols when you are loading an image.. for instance dbLoadImage("media\\mypic.png", 1); would load the image "mypic.png" from the "<current working dir>\media" directory(if it existed under the current working directory of course, it just wont do anything if the path doesnt exist) and assign it as "Image 1".

If you have a read through the "File" functions of the GDK, there are a number of them that are related to changing the working directory, either thru specifying absolute paths(not the best idea if you intend to run the app on other machines) or relative paths(relative to the currect working directory, which is the working directory of the project by default) some of the commands that are relevant to this are : "void dbSetDir(char* szPath)" and "void dbCD(char* szPath)" , both of these function's description's are very similar, but essentially, they set the current working directory of your program to the char* szPath variable that you specify, that variable can be either an absolute path or a relative path.

ie. dbSetDir("../"); would set the current working directory of the program to be one level lower than whatever it currently is, meaning that if the current working dir is "C:\Working Dir\Projects\MyProject" and you called dbSetDir("../"); the current working directory would change to "C:\Working Dir\Projects"

If it ain't broke.... DONT FIX IT !!!
haliop
User Banned
Posted: 4th Sep 2008 07:41
awesome
apprecate your help.
ty.

Login to post a reply

Server time is: 2024-09-30 05:21:19
Your offset time is: 2024-09-30 05:21:19