19th May 2006, 06:33 PM | #1 |
Junior Member
Member
Join Date: Jun 2003
Location: NC, US
Posts: 11
|
How do I associate a texture file with an object?
I'm updating my x3d_importer for AC3D version 6.0.
How do I go about loading a texture and associating it with an object? I was looking at add_new_texture_opt but I can't figure out what arguments I'm supposed to pass. Thanks, -rick |
19th May 2006, 08:22 PM | #2 |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
Hi Rick,
90% sure of this - perhaps Andy can verify: char *name = the full path to the texture char *origname = a partial/relative or filename-only path? (not entirely sure on this, but having the correct filename in *name seems to load it...) add_new_texture_opt() returns the texture ID of the newly loaded texture, which you should be able to assign to the object using object_texture_set(). Hope that's correct |
19th May 2006, 08:46 PM | #3 |
Junior Member
Member
Join Date: Jun 2003
Location: NC, US
Posts: 11
|
Thanks Dennis!
That is exactly what I needed. I compiled a new version for AC3D6 for win32. (i'll get to the linux soon) You can find it here: http://ac3d.kimballsoftware.com/ -rick |
|
|