コード例 #1
0
	void Cocos2dRenderManager::update(float delayTime)
	{
		if (!mIsInitialise)
			return;

		onFrameEvent(delayTime);
	}
コード例 #2
0
	void DummyRenderManager::drawOneFrame()
	{
		Gui* gui = Gui::getInstancePtr();
		if (gui == nullptr)
			return;

		static Timer timer;
		static unsigned long last_time = timer.getMilliseconds();
		unsigned long now_time = timer.getMilliseconds();
		unsigned long time = now_time - last_time;

		onFrameEvent((float)((double)(time) / (double)1000));

		last_time = now_time;

		begin();
		onRenderToTarget(this, false);
		end();
	}
コード例 #3
0
ファイル: MGUI_RenderSystem.cpp プロジェクト: ak4hige/myway3d
	void MGUI_RenderSystem::drawOneFrame()
	{
		MyGUI::Gui* gui = MyGUI::Gui::getInstancePtr();
		if (gui == nullptr)
			return;

		RS_RenderEvent(RenderUI);

		static MGUI_Timer timer;
		static unsigned long last_time = timer.getMilliseconds();
		unsigned long now_time = timer.getMilliseconds();
		unsigned long time = now_time - last_time;

		onFrameEvent((float)((double)(time) / (double)1000));

		last_time = now_time;

		begin();
		onRenderToTarget(this, mUpdate);
		end();

		mUpdate = false;
	}
コード例 #4
0
ファイル: manager.cpp プロジェクト: jhooks1/openmw
    void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation)
    {
        Gui* gui = Gui::getInstancePtr();
        if (gui == nullptr)
            return;

        if (Ogre::RENDER_QUEUE_OVERLAY != queueGroupId)
            return;

        Ogre::Viewport* viewport = mSceneManager->getCurrentViewport();
        if (nullptr == viewport
                || !viewport->getOverlaysEnabled())
            return;

        if (mWindow->getNumViewports() <= mActiveViewport
                || viewport != mWindow->getViewport(mActiveViewport))
            return;

        mCountBatch = 0;

        static Timer timer;
        static unsigned long last_time = timer.getMilliseconds();
        unsigned long now_time = timer.getMilliseconds();
        unsigned long time = now_time - last_time;

        onFrameEvent((float)((double)(time) / (double)1000));

        last_time = now_time;

        //begin();
        setManualRender(true);
        onRenderToTarget(this, mUpdate);
        //end();

        // сбрасываем флаг
        mUpdate = false;
    }