Using Shaders with .obj files

Hey i am trying to apply a toon shader to a .obj file. But when i load and draw the .obj file, and use the shader, all that happens is tht the model gets drawn with the color specified in the shader, none of the effects of the shader are implemented on model. But when i use glut objects like a teapot, etc it works. Is there some sort of way of doing this??

You said : “But when i use glut objects like a teapot, etc it works”

Therefore, your shaders are working ok.

Since it isn’t working with your OBJ object, there is something wrong at that level.

i figured tht was the problem. Am using a c++ obj parser from here http://www.kixor.net/dev/objloader/

The drawing is done by drawing the vertices for each face.

Is there another way i can load models, nothing too complicated. Am trying to implement the ACM Xtoon shader paper. Thought it would be nice if i could show it on different models.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.