Пример #1
0
void T3DControl::render(Trendercontext *rc, const TObjectRenderStatus *status, bool isrecording)
{
	if (!G_isvisible()) return;
	if (!rc->G_viewport()->G_showcontrols()) return;
	if (!G_3DCosmos().G_showcontrols()) return;

	double x0=position->G3_x();
	double y0=position->G3_y();
	double sx=G_controlsizex();
	double sy=G_controlsizey();

	rc->enablelight(status->enablelight);
	rc->SetBlendType(status->currentobjectblendtype);
	rc->EnableDepthMask(status->currentobjectdepthmask!=DepthMaskDisable);
	rc->EnableDepthTest(status->currentobjectdepthtest!=DepthTestDisable);

	rc->set_orientation(+1);


	if ((G_canselect())&&(G_isactive()))
	{
		rc->set_color(0.0,0.4,0.0,1.0);
		render_frame(rc,x0-G_textsize()/5,y0-G_textsize()/5,sx+2*G_textsize()/5,sy+2*G_textsize()/5,G_offset());
	}
	rc->set_color(color->G_R(),color->G_G(),color->G_B(),color->G_A());
	render_impl(rc,status);
}
Пример #2
0
//----------------------------------------------------------------------------//
void FalagardComponentBase::render(Window& srcWindow,
                                   const CEGUI::ColourRect* modColours,
                                   const Rectf* clipper,
                                   bool clipToDisplay) const
{
    Rectf dest_rect(d_area.getPixelRect(srcWindow));

    if (!clipper)
        clipper = &dest_rect;

    const Rectf final_clip_rect(dest_rect.getIntersection(*clipper));
    render_impl(srcWindow, dest_rect, modColours,
                &final_clip_rect, clipToDisplay);
}