LabelSelectionPainter::LabelSelectionPainter( void ) { createShader(); initVao(); _renderer[4] = new TextRenderer("C://Windows//fonts//times.ttf", 28); _renderer[3] = new TextRenderer("C://Windows//fonts//times.ttf", 20); _renderer[2] = new TextRenderer("C://Windows//fonts//times.ttf", 16); _renderer[1] = new TextRenderer("C://Windows//fonts//times.ttf", 12); _renderer[0] = new TextRenderer("C://Windows//fonts//times.ttf", 10); _active = false; }
Batch::Batch( const geom::Source &source, const gl::GlslProgRef &glsl, const AttributeMapping &attributeMapping ) : mGlsl( glsl ) { geom::AttribSet attribs; // include all the attributes in the custom attributeMapping for( const auto &attrib : attributeMapping ) { if( source.getAttribDims( attrib.first ) ) attribs.insert( attrib.first ); } // and then the attributes references by the GLSL for( const auto &attrib : glsl->getActiveAttributes() ) { if( source.getAttribDims( attrib.getSemantic() ) ) attribs.insert( attrib.getSemantic() ); } mVboMesh = gl::VboMesh::create( source, attribs ); initVao( attributeMapping ); }
void Batch::replaceVboMesh( const VboMeshRef &vboMesh ) { mVboMesh = vboMesh; initVao( mAttribMapping ); }
void Batch::replaceGlslProg( const GlslProgRef& glsl ) { mGlsl = glsl; initVao( mAttribMapping ); }
Batch::Batch( const VboMeshRef &vboMesh, const gl::GlslProgRef &glsl, const AttributeMapping &attributeMapping ) : mGlsl( glsl ), mVboMesh( vboMesh ) { initVao( attributeMapping ); }