Skip to main content

load a texture

No replies
tetinger
Offline
Joined: 2011-11-26
Points: 0

hello,

i am java 3D total beginner ..

i am just working on a little project that i need to load an obj model, and then i need to add texture.

now, i use a simple obj loader class, that works (using objectfile class to load the obj model), and i cant figure out how to load the texture.

now, all the texture is 'built in', i mean the obj model contains the mapping and reference to .mtl file that reference to jpg file. i just need to load the texture.

this is how i load the object:

objectfile f = new object file ....

scene s = null;

s = f.load(filename);

the texture contains: .obj, .mtl, .jpg

can some1 plz help me to load the texture ?

thanks in advance,

gal.