   GLM obj loading + GLSL
  So, I've got the expanded upon version of GLM working in my OpenGL project and it loads object models. yay. (http://devernay.free.fr/hacks/glm/)The model rendering calls from GLM of course use fixed functionality. If I wanted to apply a simple GLSL shader that does per pixel lighting to a model (with a texture), how would I even go about that without tearing up the existing GLM code? Or is there no easy way to do this.Any insight is welcome. Thanks   
Quote:Original post by MantisTobaganMDThe model rendering calls from GLM of course use fixed functionality.I'm not sure why you say "of course", but..Quote:If I wanted to apply a simple GLSL shader that does per pixel lighting to a model (with a texture), how would I even go about that without tearing up the existing GLM code? Or is there no easy way to do this.I don't know the GLM code base, but if it's designed well, the mesh data should be separate from the rendering code (data-driven approach).You will then have to replace all fixed pipeline functionality in the rendering code with shaders. It's not complicated though.Look up some GLSL book and you'll get a texture shader running in no time. Then you can enhance it to implement phong shading for example. If you don't want to learn the math behind it, you can essentially copy paste its code.