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 / Problem loading textures?

Author
Message
Interplanetary Funk
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 24th Apr 2010 19:49 Edited at: 24th Apr 2010 19:51
I've been messing around with DGDK for about a week now and decided I'd get comfortable with the 3D functions before I trap myself in 2D dev, however, I've run into a problem when trying to apply a texture to my model, it simply stays white.

heres my code:


sorry if I'm becoming the forum pest, but I really have been wanting to do some game dev for a while now and really want to learn.

edit:
I have searched the forum, but none of the solutions helped (I looked at every result).
Serial Velocity
15
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 24th Apr 2010 20:54
What seems to lack in DarkGDK is error reporting, it silently fails if say an image failed to load or whatever. You need to impliment this yourself using something like:



Make sure your image files are situated in the same directory as your vcproj file, so that DarkGDK can find it.

Interplanetary Funk
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 24th Apr 2010 22:15
I've done that, and its still saying the image has loaded, so I don't know what's going on =S
Serial Velocity
15
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 24th Apr 2010 23:26 Edited at: 24th Apr 2010 23:27
Maybe there's something wrong with the model. Try creating a cube with dbMakeObjectCube() and texture that.

One last thing, dbScaleObject() uses a scale of percentages, not units, so your scaling it to 1% its original size; I would fix that

Interplanetary Funk
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 24th Apr 2010 23:52
It exported as a VERY big model, it's ridiculously hug.
Interplanetary Funk
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 24th Apr 2010 23:54
Yeah, it works on a cube, so I'm guessing there's something wrong with the model -.-
Kaichiro
14
Years of Service
User Offline
Joined: 19th Mar 2010
Location:
Posted: 6th May 2010 03:30
I've just recently had the same problem as you. I spent almost a week trying to texture a .x model, but simply said, I hit the drop dead date and dropped the models thing. My whole game is using primitives now and it works just fine. As I understand it, DarkGDK cannot texture models (.x anyways...), but can load pre-textured models. If you can go back to your editor and texture them before exporting them, then it's problem solved.

The DarkGDK sample projects have a few instances where they texture models using dbTextureObject, but I simply have not been able to reproduce those results on any level other than on a dbMakeObjectBox().

Login to post a reply

Server time is: 2024-07-07 01:59:45
Your offset time is: 2024-07-07 01:59:45