Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 19th May 2006, 06:33 PM   #1
Rick Kimball
Junior Member
Member
 
Join Date: Jun 2003
Location: NC, US
Posts: 11
Default 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
Rick Kimball is offline   Reply With Quote
Old 19th May 2006, 08:22 PM   #2
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

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
Dennis is offline   Reply With Quote
Old 19th May 2006, 08:46 PM   #3
Rick Kimball
Junior Member
Member
 
Join Date: Jun 2003
Location: NC, US
Posts: 11
Default

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
Rick Kimball is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 02:22 PM.


AC3D Forum
(C) Inivis Limited 2020