本文整理汇总了C++中GLSLShader::loadFragmentShader方法的典型用法代码示例。如果您正苦于以下问题:C++ GLSLShader::loadFragmentShader方法的具体用法?C++ GLSLShader::loadFragmentShader怎么用?C++ GLSLShader::loadFragmentShader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GLSLShader
的用法示例。
在下文中一共展示了GLSLShader::loadFragmentShader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadShaders
// load Shaders
// XXX: NEEDS TO BE IMPLEMENTED
void Common::loadShaders(){
// XXX
normQuadShader.loadVertexShader("shaders/quad.vert");
normQuadShader.loadFragmentShader("shaders/quad.frag");
normQuadShader.bindVertexAttrib("position", TriMesh::attribVertex);
normQuadShader.link();
quadShader.loadVertexShader("shaders/quadShader.vert");
quadShader.loadFragmentShader("shaders/quadShader.frag");
quadShader.loadFragmentShader("shaders/blinnPhongReflection");
quadShader.bindVertexAttrib("position", TriMesh::attribVertex);
quadShader.link();
sphereMapShader.loadVertexShader("shaders/sphere.vert");
sphereMapShader.loadFragmentShader("shaders/sphere.frag");
sphereMapShader.loadFragmentShader("shaders/blinnPhongReflection");
sphereMapShader.bindVertexAttrib("position", TriMesh::attribVertex);
sphereMapShader.bindVertexAttrib("normal", TriMesh::attribNormal);
sphereMapShader.bindVertexAttrib("texCoord", TriMesh::attribTexCoord);
sphereMapShader.link();
texturingShader.loadVertexShader("shaders/textur.vert");
texturingShader.loadFragmentShader("shaders/textur.frag");
texturingShader.loadFragmentShader("shaders/blinnPhongReflection");
texturingShader.bindVertexAttrib("position", TriMesh::attribVertex);
texturingShader.bindVertexAttrib("normal", TriMesh::attribNormal);
texturingShader.bindVertexAttrib("texCoord", TriMesh::attribTexCoord);
texturingShader.link();
silhouetteShader.loadVertexShader("shaders/silhouette.vert");
silhouetteShader.loadFragmentShader("shaders/silhouette.frag");
silhouetteShader.bindVertexAttrib("position", TriMesh::attribVertex);
silhouetteShader.bindVertexAttrib("normal", TriMesh::attribNormal);
silhouetteShader.link();
// END XXX
}