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); }
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); }
void UnderWaterGodRay::Render(const Vec3 & vWaterPosition) { mWaterPosition = vWaterPosition; _updateProjector(); if (!mEnable) return ; float dtime = Engine::Instance()->GetFrameTime(); mPerlin->update(dtime); _updateRays(); RenderSystem * render = RenderSystem::Instance(); RenderTarget * rt = render->GetRenderTarget(0); _renderRay(); render->SetRenderTarget(0, rt); _blend(); }