![]() This class is Cinder's representation of a GLSL program (sometimes called a shader). However we capture the result to a gl::GlslProgRef. We still call gl::getStockShader() using a gl::ShaderDef. Instead we're relying on an instance of gl::Batch called mBox, which we initialize in setup(). The most important change though is that we're no longer calling gl::drawCube(). We still call gl::setMatrices() every frame however, in order to reset our Model and Projection matrices. First, we're preparing our CameraPersp in setup() now, storing it in the member variable mCam. This example contains several new concepts, so let's look at each one individually. Your browser does not support embedded video. ![]() MBox = gl::Batch::create( geom::Cube(), shader ) Gl::GlslProgRef shader = gl::getStockShader( lambert ) Auto lambert = gl::ShaderDef().lambert().color()
0 Comments
Leave a Reply. |