コード例 #1
0
ファイル: viewport.cpp プロジェクト: lhharold/six
Viewport::~Viewport() {
    for (ListenerList::iterator i = mListeners.begin(); i != mListeners.end(); ++i) {
        (*i)->viewportDestroyed(this);
    }

    RenderSystem* rs = Root::get().getRenderSystem();
    if (rs && (rs->getViewport() == this)) {
        rs->setViewport(NULL);
    }
}
コード例 #2
0
ファイル: viewport.cpp プロジェクト: lhharold/six
void Viewport::clear(u32 buffers/* = FBT_COLOUR | FBT_DEPTH*/, const Color& color/* = Color::Black*/, f32 depth/* = 1.f*/, u16 stencil/*  = 0*/) {
    RenderSystem* rs = Root::get().getRenderSystem();
    if (rs) {
        Viewport* currentvp = rs->getViewport();
        if (currentvp && currentvp == this) {
            rs->clearFrameBuffer(buffers, color, depth, stencil);
        } else if (currentvp) {
            rs->setViewport(this);
            rs->clearFrameBuffer(buffers, color, depth, stencil);
            rs->setViewport(currentvp);
        }
    }
}
コード例 #3
0
ファイル: Viewport.cpp プロジェクト: 523793658/directX
	void Viewport::clear(uint32_t buffers /* = FBT_COLOUR | FBT_DEPTH */, const ColourValue& colour /* = ColourValue::Black */, float depth /* = 1.0f */, uint16_t stencil /* = 0 */)
	{
		RenderSystem* rs = Engine::getSingleton().getRenderSystem();
		if (rs)
		{
			Viewport* currentvp = rs->getViewport();
			if (currentvp && currentvp == this)
			{
				rs->clearFrameBuffer(buffers, colour, depth, stencil);
			}
			else
			{
				rs->setViewport(this);
				rs->clearFrameBuffer(buffers, colour, depth, stencil);
				rs->setViewport(currentvp);
			}
		}
	}