PDA

View Full Version : About texture mapping with .obj file~~~thanks



uJason
03-04-2009, 10:24 AM
Hi there, i am a newb here.
I got a sample code from here.
OBJ reader (http://www.xmission.com/~nate/smooth/smooth.zip)

And i've already load my .obj model from that sample code, and put the texture graphs in the same folder ; but after executing the sample code, my model is come out without textures.
(I'm sure my .obj model have texture coordinates, and it can be opened from other software like 3DS Max.)

Can anyone help me~ :) thanks alot.


Best regards

Jason

enunes
03-04-2009, 02:19 PM
Hi,

did you set up the other parameters and glEnable (GL_TEXTURE_2D) ?

uJason
03-05-2009, 01:40 AM
What's that mean "set up other parameters" :) ?

And i've already check my code, there is not any word like "GL_Texture_2D", but there are glEnable( GL_LIGHTING )and
glEnable( GL_DEPTH_TEST ) in my code . How should i do :)? Thanks.



Best regards

Jason

dletozeun
03-05-2009, 05:54 AM
It looks like this program does show textures.
You can find more information about texture mapping the the wiki:
http://www.opengl.org/wiki/Texture_Mapping

Feel free to ask more questions.

ZbuffeR
03-05-2009, 06:08 AM
What is your video card ?
A possibility is that you put NPOT textures, and your hardware only supports POT.

uJason
03-05-2009, 09:48 AM
My video card is Nvidia 7950 GT, thanks :)



Best regard

Jason

uJason
03-05-2009, 09:50 AM
It looks like this program does show textures.
You can find more information about texture mapping the the wiki:
http://www.opengl.org/wiki/Texture_Mapping

Feel free to ask more questions.

Thanks for suggestion. I'will go check that website :)

Best regard
Jason