コード例 #1
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);
        }
    }
}
コード例 #2
0
ファイル: OgreViewport.cpp プロジェクト: danyr/gamekit
    //---------------------------------------------------------------------
	void Viewport::clear(unsigned int buffers, const ColourValue& col,  
						 Real depth, unsigned short stencil)
	{
		RenderSystem* rs = Root::getSingleton().getRenderSystem();
		if (rs)
		{
			Viewport* currentvp = rs->_getViewport();
			if (currentvp && currentvp == this)
				rs->clearFrameBuffer(buffers, col, depth, stencil);
			else if (currentvp)
			{
				rs->_setViewport(this);
				rs->clearFrameBuffer(buffers, col, 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);
			}
		}
	}
コード例 #4
0
ファイル: FairySystem.cpp プロジェクト: jjiezheng/pap_full
    void renderQueueStarted(uint8 queueGroupId, const Ogre::String& invocation,
                            bool& skipThisInvocation)
    {
        using namespace Ogre;

        if (queueGroupId == RENDER_QUEUE_6)
        {
            RenderSystem* rs = Root::getSingleton().getRenderSystem();
            rs->clearFrameBuffer(FBT_STENCIL);
            rs->setStencilCheckEnabled(true);
            rs->setStencilBufferParams(
                CMPF_ALWAYS_PASS,
                0xFFFFFFFF, 0xFFFFFFFF,
                SOP_KEEP,
                SOP_INCREMENT,
                SOP_REPLACE,
                false);
        }
    }