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 with dbTextureObject

Author
Message
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 26th Jun 2008 15:22
sometime it work
sometime it not work my object turn to white why?

sometime i use this



but it not work..
plane still white no any texture ..why??
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Jun 2008 22:36
dbTextureObject changes the object's FVF, so you should call it first, I think. (Collision is not affected, only the functions that affect the object's appearance.)

Also, it is possible that your image did not load. Perhaps you should call dbImageExist to verify that it got loaded.

Finally, you are using the image as a sprite, so you probably don't want to load it as a texture. If you use this syntax, it will load as an image, with no scaling, or mip-map creation:
dbLoadImage ( "data\\data\\sprite\\firespark.bmp",37, 1);
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th Jun 2008 10:49
it still not work..
i don't understand why?

dbLoadObject ( "data\\model\\Player\\boy0.x ",10);
dbLoadImage ( "data\\model\\Player\\eye1.bmp",36,1);
dbLoadImage ( "data\\data\\sprite\\firespark.bmp",37,1);


dbCloneObject (1, 10);
dbAutoCamOff();
dbTextureObject( 1, 36); // <-------------- not work

for (int i=stObId; i<enObId; i++)
{
dbMakeObjectPlane ( i , 1 , 1 );
dbTextureObject ( i , 37 ); // <-------------- not work
//dbSetObjectCollisionOff ( i );
dbSetObjectLight ( i , 0 );
dbPositionObject ( i , ix, iy, iz );
}


still not change texture ... why?
image 36 and 37 when i check by using dbPasteImage ()
it show on screen... but cannot use for texture
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Jun 2008 20:42
1: Use code blacks when posting code:

[ c o d e ]
some code
[ / c o d e ]

2: not enough information. You're code looks fine - but its probably what we dont see thats causing a problem.

Are you seeing a white plain where you expect texture - or do you see "nothing"???

How bout more code.

Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th Jun 2008 22:13
about pain texture i can fix it now cause of spelling filename after i change file name..-_-"

but about ->
dbLoadObject ( "data\\model\\Player\\boy0.x ",10);

it is a character model that already has a uv texture;

after i load to game i try to change it texture but not work..
but if i make mesh from object and texture it with image number 36 .... it can texture the mesh..
but the object from -> dbCloneObject (1, 10);
it cannot change texture
but if i change file name "eye1.bmp" to "eye1s.bmp"
and use last code -> dbLoadImage ( "data\\model\\Player\\eye1.bmp",36,1);
use dbPasteImage () to check if it exist.. it not exist for sure because changing file name..
but the texture from Object(1) is gone it turn to white..
hmm ..
if filename is exist nothing happen...
if filename is missing it turn to white... o.O?

the object which already has texture cannot change texture?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Jun 2008 23:14
yuo should be able too - but I wonder if you're running into a CLONE OBJECT not exactly what we thought kind of thing???

Try on a NOT CLONED object? Is it the same way?

Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Jul 2008 12:33
i use same code with another model .x it work ..

but my model "boy0.x" .. it's cannot change texture..

why??
Y-Y
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jul 2008 17:51
dunno - I have seen "problematic" models before though.

Login to post a reply

Server time is: 2024-09-30 01:38:44
Your offset time is: 2024-09-30 01:38:44