- Timestamp:
- 10/08/09 18:23:40 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvertexattributes/osgvertexattributes.cpp
r10618 r10619 49 49 std::string convertShader(std::string source) 50 50 { 51 // replace ftransform as it only works with built-ins 52 replace(source, "ftransform()", "gl_ModelViewProjectionMatrix * gl_Vertex"); 53 54 // replace the vertex attributes 51 55 replace(source, "gl_Vertex", "osg_Vertex"); 52 56 replace(source, "gl_Normal", "osg_Normal"); … … 62 66 replace(source, "gl_MultiTexCoord6", "osg_MultiTexCoord6"); 63 67 replace(source, "gl_MultiTexCoord7", "osg_MultiTexCoord7"); 68 69 // replace the modelview and project matrices 70 replace(source, "gl_ModelViewMatrix", "osg_ModeViewMatrix"); 71 replace(source, "gl_ModelViewProjectionMatrix", "osg_ModelViewProjectionMatrix"); 72 replace(source, "gl_ProjectionMatrix", "osg_ProjectionMatrix"); 73 64 74 return source; 65 75 }
