本文整理汇总了C++中Renderable::setFragmentShaderPath方法的典型用法代码示例。如果您正苦于以下问题:C++ Renderable::setFragmentShaderPath方法的具体用法?C++ Renderable::setFragmentShaderPath怎么用?C++ Renderable::setFragmentShaderPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Renderable
的用法示例。
在下文中一共展示了Renderable::setFragmentShaderPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupBounds
void setupBounds()
{
Vec3f topLeftFront = Vec3f(-WIDTH/2., HEIGHT/2.,DEPTH/2.);
Vec3f topLeftBack = Vec3f(-WIDTH/2., HEIGHT/2.,-DEPTH/2.);
Vec3f topRightFront = Vec3f(WIDTH/2., HEIGHT/2.,DEPTH/2.);
Vec3f topRightBack = Vec3f(WIDTH/2., HEIGHT/2.,-DEPTH/2.);
Vec3f botLeftFront = Vec3f(-WIDTH/2., -HEIGHT/2.,DEPTH/2.);
Vec3f botLeftBack = Vec3f(-WIDTH/2., -HEIGHT/2.,-DEPTH/2.);
Vec3f botRightFront = Vec3f(WIDTH/2., -HEIGHT/2.,DEPTH/2.);
Vec3f botRightBack = Vec3f(WIDTH/2., -HEIGHT/2.,-DEPTH/2.);
bounds.setColour(Vec3f(0,0,1));
bounds.setFragmentShaderPath("Shaders/basic_fs.glsl");
bounds.setVertexShaderPath("Shaders/basic_vs.glsl");
bounds.setRenderMode(GL_LINES);
std::vector<Vec3f> points;
points.push_back(topLeftFront);
points.push_back(topLeftBack);
points.push_back(topLeftBack);
points.push_back(topRightBack);
points.push_back(topRightBack);
points.push_back(topRightFront);
points.push_back(topRightFront);
points.push_back(topLeftFront);
points.push_back(botLeftFront);
points.push_back(botLeftBack);
points.push_back(botLeftBack);
points.push_back(botRightBack);
points.push_back(botRightBack);
points.push_back(botRightFront);
points.push_back(botRightFront);
points.push_back(botLeftFront);
points.push_back(topLeftFront);
points.push_back(botLeftFront);
points.push_back(topRightFront);
points.push_back(botRightFront);
points.push_back(topLeftBack);
points.push_back(botLeftBack);
points.push_back(topRightBack);
points.push_back(botRightBack);
bounds.setVerts(points);
}