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 obey me, please help! (dbTextureObject)

Author
Message
alpines
6
Years of Service
User Offline
Joined: 17th Feb 2013
Location:
Posted: 17th Feb 2013 16:21 Edited at: 17th Feb 2013 20:04
Edit {
Texture works perfect with dbMakeObjectCube but not with *.x}

Hi TGC Community!

I'm new in DarkGDK and didn't know if I had to post this into DarkGDK or DarkGDK.Net. However it doesn't matter I think.

If it's in the wrong section please move it!

I'm using DarkGDK on VS C++ 2010 Express (with DGDK Upgrades for MSVC2010) and I have some problems with texturing objtecs and I thought you can help me.

I'm loading an object (modelled with Blender, exported als *.x) and loaded a texture e.g. texture.png.

If I try to use dbTextureObject(1, 2);
1 = Object (Cube)
2 = Texture (texture.png)

then the Cube remains black OR in another case it remains brown.

If I apply a texture inside Blender to the Cube then the cube remains in a darkbrown color but in Blender if I render it then it's a cube with the texture on it.

I didn't have the problems some months ago on another computer!

Please help me! Thank you!

Greetings.
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Feb 2013 21:35
Might be that there is no UV data exported with the mesh.
Try dbConvertObjectFvf(objID, 338).


"Why do programmers get Halloween and Christmas mixed up?"
alpines
6
Years of Service
User Offline
Joined: 17th Feb 2013
Location:
Posted: 18th Feb 2013 19:17
Unfortunetaly I don't have any function named dbConvertObjectFvf.

If it helps, I'm using the free version of DarkGDK.
alpines
6
Years of Service
User Offline
Joined: 17th Feb 2013
Location:
Posted: 18th Feb 2013 19:20
Sry my doubleposting (new here, can't edit it now).

dbConvertObjectFVF works but it has no effect.
The cube remains black.
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Mar 2013 11:56
Care to upload your code along with the media you're using?
Might help in figuring out the problem.


"Why do programmers get Halloween and Christmas mixed up?"
Brendy boy
14
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 1st Mar 2013 13:33
does your object have uv coordinates? Texture won't show without them

Login to post a reply

Server time is: 2019-11-12 19:31:55
Your offset time is: 2019-11-12 19:31:55