   From Vertex Shader back to OpenGL-Transformation ?
  Hi there !I just have programmed a custom vertex shader for my OpenGL-based game.But now I want to make it run even on graphic cards which are not able to load custom vertex shaders. So I want to compute all necessary transformations on the CPU.My Problem is, that I have to transform ALL Vertices (or Polygons) in my scene by a 4x4-matrix,  which has to be recomputed every frame.Does anybody know which OpenGL-methods to use ?   Do I have to modify the OpenGL-modelview-matrix or the projection matrix ? I am currently quite desperate about this issue, I hope somebody knows a option how to "migrate" a vertex shader back to the CPU.   
Quote:Original post by putenuterHi there !I just have programmed a custom vertex shader for my OpenGL-based game.But now I want to make it run even on graphic cards which are not able to load custom vertex shaders. So I want to compute all necessary transformations on the CPU.My Problem is, that I have to transform ALL Vertices (or Polygons) in my scene by a 4x4-matrix,  which has to be recomputed every frame.Does anybody know which OpenGL-methods to use ?   Do I have to modify the OpenGL-modelview-matrix or the projection matrix ? I am currently quite desperate about this issue, I hope somebody knows a option how to "migrate" a vertex shader back to the CPU.Transform all vertices by a 4x4 matrix? That would very likely be the modelview matrix (load it with glLoadMatrix).What is the purpose? Camera class? If it's a camera class, then yes, go for modelview.   ;  I just have programmed a custom vertex shader for my OpenGL-based game.But now I want to make it run even on graphic cards which are not able to load custom vertex shaders. So I want to compute all necessary transformations on the CPU.I think your should pass your computed values by glUniformXX to your shaders, all is according your own program.To Disable shaders ? glUseProgram(0),please lookup some function in documents   ;  First of all, cross-posting is not good.Second, why do you need a vertex shader for something so simple as transforming the vertices with a matrix? You are aware that vertex shaders is not the beginning of vertex transformations, right? There was life before them. It seems to me that you jumped directly to shaders without understanding the traditional pipeline first. You can compute the matrix and use glLoadMatrix() or glMultMatrix() to load it or multiply it with the current matrix respectively.Third, what do you mean if you have to use the projection or the modelview matrix? It depends what is it that you want to do. It's probably the modelview, but if you have to ask you need to go back to the Red Book and learn the basics first well before you start messing with such advanced topics as shaders.   