Esempio n. 1
0
void UIRenderer::_draw(const rect_type &rect, const color_t &color) {
    Device &r = Device::instance();
    Quad quad;
	quad.setLocation(_modify_rect(rect, r.scaleInPixel())).setColor(_blend(color));
    r.setTexture(0);
    r.drawQuad(quad);
}
Esempio n. 2
0
void UIRenderer::_draw(const rect_type &rect, const color_t &color, const TexturePtr &texture, const vector2f *texcoords) {
    Device &r = Device::instance();
    Quad quad;
	quad.setLocation(_modify_rect(rect, r.scaleInPixel())).setColor(_blend(color));
    quad.vertices[0].texcoord = texcoords[0];
    quad.vertices[1].texcoord = texcoords[1];
    quad.vertices[2].texcoord = texcoords[2];
    quad.vertices[3].texcoord = texcoords[3];
    
    r.setTexture(texture);
    r.drawQuad(quad);
}