void Billboard::draw(const Matrix3& transformationMatrix, SceneGraph::AbstractCamera2D& camera) { shader.setTransformationProjectionMatrix(camera.projectionMatrix()*transformationMatrix) .setTexture(texture) .setColorCorrectionTexture(colorCorrectionTexture); mesh.draw(shader); }
void Sprite::draw(const Matrix3& transformationMatrix, SceneGraph::AbstractCamera2D& camera) { if(!_texture) return; _shader->setTransformationProjectionMatrix(camera.projectionMatrix()*transformationMatrix*Matrix3::scaling(Vector2(_size))) .use(); _texture->bind(Shaders::Flat2D::TextureLayer); _mesh->draw(); }
void TextSprite::draw(const Matrix3& transformationMatrix, SceneGraph::AbstractCamera2D& camera) { _shader->setBackgroundColor(_backgroundColor) .setColor(_color) .setTransformationProjectionMatrix(camera.projectionMatrix()*transformationMatrix) .use(); _glyphCache->texture().bind(Shaders::Vector2D::VectorTextureLayer); _mesh.draw(); }
void AbstractHudText::draw(const Matrix3& transformationMatrix, SceneGraph::AbstractCamera2D& camera) { shader->setTransformationProjectionMatrix(camera.projectionMatrix()*transformationMatrix) .setColor(Color3(1.0f)) .setOutlineRange(0.5f, 1.0f) .setVectorTexture(glyphCache->texture()); text->mesh().draw(*shader); }