• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ EndScene函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中EndScene函数的典型用法代码示例。如果您正苦于以下问题:C++ EndScene函数的具体用法?C++ EndScene怎么用?C++ EndScene使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了EndScene函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: EndScene

bool CocoRoomTodayCandy::ccTouchBegan(CCTouch* pTouch, CCEvent* pEvent)
{
    if (isTouched)
        return false;
    isTouched = true;
    isScrolling = false;
    isScrollViewTouched = false;

    CCPoint point = pTouch->getLocation();

    if (scrollView->boundingBox().containsPoint(point))
        isScrollViewTouched = true;

    for (int i = 0 ; i < spriteClass->spriteObj.size() ; i++)
    {
        if (spriteClass->spriteObj[i]->name == "button/btn_x_brown.png")
        {
            if (spriteClass->spriteObj[i]->sprite->boundingBox().containsPoint(point))
            {
                EndScene();
                break;
            }
        }
        else if(spriteClass->spriteObj[i]->name == "button/btn_red_mini.png")
        {
            if (spriteClass->spriteObj[i]->sprite->boundingBox().containsPoint(point))
            {
                // todayCandyKakaoId 리스트 갱신
                todayCandyKakaoId.clear();
                todayCandyKakaoId.push_back(myInfo->GetKakaoId()); // 본인 kakao id부터 넣자.

                for (int i = 0 ; i < selected.size() ; i++)
                {
                    if (selected[i])
                        todayCandyKakaoId.push_back( friendList[i]->GetKakaoId() );
                }
                for (int i = todayCandyKakaoId.size(); i < 5; i++)
                    todayCandyKakaoId.push_back("");

                // User Default 값 갱신
                char name[15];
                for (int i = 1 ; i < todayCandyKakaoId.size() ; i++)
                {
                    //CCLog("%s", todayCandyKakaoId[i].c_str());
                    sprintf(name, "todayCandy_%d", i);
                    CCUserDefault::sharedUserDefault()->setStringForKey(name, todayCandyKakaoId[i].c_str());
                }

                EndScene();
                break;
            }
        }
    }

    return true;
}
开发者ID:playdandi,项目名称:CocoDrawingMagic,代码行数:56,代码来源:CocoRoomTodayCandy.cpp


示例2: BeginScene

void RenderSystem::v_Render()
{
	BeginScene();

	UpdateScene();
	XMMATRIX Model = XMMatrixIdentity();
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(Model));

    m_Matrix.view = m_Camera.GetViewMatrix();
	m_Cube.Render(m_pD3D11DeviceContext.Get(), m_Matrix.model, m_Matrix.view, m_Matrix.proj);

	XMFLOAT3 camPos = m_Camera.GetPos();
	XMFLOAT3 modelPos;
	modelPos.x = 0.0f;
	modelPos.y = 1.5f;
	modelPos.z = 0.0f;
	// Calculate the rotation that needs to be applied to the billboard model to face the current camera position using the arc tangent function.
	float angle = atan2(modelPos.x - camPos.x, modelPos.z - camPos.z) * (180.0 / XM_PI);
	// Convert rotation into radians.
	float rotation = (float)angle * 0.0174532925f;
	// Setup the rotation the billboard at the origin using the world matrix.
	XMMATRIX world = XMMatrixRotationY(rotation);
	// Setup the translation matrix from the billboard model.
	XMMATRIX trans = XMMatrixTranslation(modelPos.x, modelPos.y, modelPos.z);
	world *= trans;
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(world));

	m_Square.Render(m_pD3D11DeviceContext.Get(), m_Matrix.model, m_Matrix.view, m_Matrix.proj);

	DrawInfo();

	EndScene();
}
开发者ID:byhj,项目名称:DirectX11-Tutorials,代码行数:33,代码来源:RenderSystem.cpp


示例3: BeginScene

void RsImplWinGL::Render()
{
	BeginScene();

    GLint defaultFBO;
    glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO);
    
	// Clear the render target so we don't use it in the deferred rendering pass
	m_pCurrentRenderTarget = BtNull;
    
	// Cache the number of render targets
	BtU32 numRenderTargets = m_renderTargets.GetNumItems();

	for( BtU32 i=0; i<numRenderTargets; i++ )
	{
		// Cache each render target
		RsRenderTargetWinGL &renderTarget = m_renderTargets[i];

        // Always restore the default frame buffer at the start before changing it
        glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO );
        
		// render each render target
		renderTarget.Render();
	}

	EndScene();

	ResetRenderables();
}
开发者ID:digitalinteraction,项目名称:expressy,代码行数:29,代码来源:RsImplGLES.cpp


示例4: BeginScene

// Virtual event handlers, overide them in your derived class
void project1::OnDrawImage(wxPaintEvent& event) 
{ 
  BeginScene(&m_device, opengl::colorf(0.0f, 0.0f, 0.0f, 0.0f)); 
  EndScene(&m_device); 
  
  //event.Skip(); 
}
开发者ID:antlhuede,项目名称:Spring-2014,代码行数:8,代码来源:project1.cpp


示例5: EndScene

bool RequestTopaz::ccTouchBegan(CCTouch* pTouch, CCEvent* pEvent)
{
    if (isTouched)
        return false;
    isTouched = true;
    isScrolling = false;
    isScrollViewTouched = false;
    
    CCPoint point = pTouch->getLocation();
    
    if (scrollView->boundingBox().containsPoint(point))
        isScrollViewTouched = true;
    
    for (int i = 0 ; i < spriteClass->spriteObj.size() ; i++)
    {
        if (spriteClass->spriteObj[i]->name == "button/btn_x_yellow.png")
        {
            if (spriteClass->spriteObj[i]->sprite->boundingBox().containsPoint(point))
            {
                EndScene();
                break;
            }
        }
    }
    
    return true;
}
开发者ID:playdandi,项目名称:CocoDrawingMagic,代码行数:27,代码来源:RequestTopaz.cpp


示例6: PrintDebug

//==============================================================================
// Brief  : 更新処理
// Return : void							: なし
// Arg    : void							: なし
//==============================================================================
void CSceneRanking::Update( void )
{
	// デバッグ表示
	PrintDebug( _T( "ランキング\n" ) );

	// カメラの更新
	D3DXMATRIX	mtxView;			// ビュー行列
	D3DXMATRIX	mtxOrtho;			// 正射影行列
	for( int cntCamera = 0; cntCamera < MAX_CAMERA; ++cntCamera )
	{
		m_ppCamera[ cntCamera ]->Update();
	}
	mtxView = m_ppCamera[ 0 ]->GetView();
	mtxOrtho = m_ppCamera[ 0 ]->GetOrtho();

	// 描画用変換行列の更新
	m_pArgument->m_pRenderMatrix2D->SetProjection( &mtxOrtho );
	m_pArgument->m_pRenderMatrix3D->SetView( &mtxView );

	// シーン遷移
	if( m_pArgument->m_pFade->GetState() == CObjectFade::STATE_OUT_END )
	{
		SetSceneNext( CManagerScene::SCENE_TITLE );
		EndScene();
	}
	if( m_pArgument->m_pInput->IsTrigger( CManagerInput::KEY_DECISION ) )
	{
		if( m_pArgument->m_pFade->GetState() != CObjectFade::STATE_OUT_WHILE )
		{
			m_pArgument->m_pFade->FadeOut( 20 );
		}
	}
}
开发者ID:mxt819,项目名称:H405,代码行数:38,代码来源:SceneRanking.cpp


示例7: BeginScene

void RenderSystem::v_Render()
{
	BeginScene();

	static float t = 0.0f;
	static ULONGLONG timeStart = 0;
	ULONGLONG timeCur = GetTickCount64();
	if (timeStart==0)
		timeStart = timeCur;

	t = (timeCur-timeStart)/1000.0f;

	// Light
	XMMATRIX mSpin = XMMatrixRotationZ(-t);
	XMMATRIX mOrbit = XMMatrixRotationY(-t * 2.0f);
	XMMATRIX mTranslate = XMMatrixTranslation(-3.0f, 0.0f, 0.0f);
	XMMATRIX mScale = XMMatrixScaling(0.3f, 0.3f, 0.3f);
	XMMATRIX worldCube = mScale * mSpin * mTranslate * mOrbit;
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(worldCube));
	m_Cube.Render(m_pD3D11DeviceContext, m_Matrix, XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f) );

	XMFLOAT4 lightPos = XMFLOAT4(m_Matrix.model._14, m_Matrix.model._24, m_Matrix.model._34, 0.0f);

	//Object
	XMMATRIX rotMat = XMMatrixRotationY(t/10.0f);
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(rotMat));
	m_Cube.Render(m_pD3D11DeviceContext, m_Matrix, lightPos);

	EndScene();
}
开发者ID:byhj,项目名称:DirectX11-Sample,代码行数:30,代码来源:RenderSystem.cpp


示例8: BeginScene

void RenderSystem::v_Render()
{

	BeginScene();

	m_Matrix.view = m_Camera.GetViewMatrix();

	DisableZbuffer();
	DisableCulling();

	m_Matrix.view._14 = 0.0f;
	m_Matrix.view._24 = 0.0f;
	m_Matrix.view._34 = 0.0f;
	m_Matrix.view._41 = 0.0f;
	m_Matrix.view._42 = 0.0f;
	m_Matrix.view._43 = 0.0f;
	XMMATRIX sphereWorld = XMMatrixIdentity();
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(sphereWorld));
	m_Skymap.Render(m_pD3D11DeviceContext, m_Matrix);

	EnableCulling();
	EnableZbuffer();


	m_Matrix.view = m_Camera.GetViewMatrix();
	XMMATRIX gridModel = XMMatrixIdentity();
	XMStoreFloat4x4(&m_Matrix.model, XMMatrixTranspose(gridModel));
	m_Terrain.Render(m_pD3D11DeviceContext, m_Matrix);

	DrawInfo();

	EndScene();

}
开发者ID:byhj,项目名称:DirectX11-Terrian,代码行数:34,代码来源:RenderSystem.cpp


示例9: DrawScene

void DrawScene()
{
	BeginScene(1);
	RenderQuad(p_logo,0,0,0,0,(480-p_logo->w)/2,(272-p_logo->h)/2,1,1,0,MAKE_RGBA_8888(255,255,255,40));
	mParticleSys->Render();
	EndScene();
}
开发者ID:sgastudio,项目名称:topoc,代码行数:7,代码来源:test.cpp


示例10: MyEndScene

	static HRESULT STDMETHODCALLTYPE MyEndScene(IDirect3DDeviceN* pThis)
	{
		d3ddebugprintf(__FUNCTION__ "(0x%X) called.\n", pThis);
		HRESULT rv = EndScene(pThis);

		return rv;
	}
开发者ID:Bobakanoosh55555,项目名称:hourglass-win32,代码行数:7,代码来源:d3dhooks.cpp


示例11: BeginScene

void GSDevice10::StretchRect(Texture& st, const GSVector4& sr, Texture& dt, const GSVector4& dr, ID3D10PixelShader* ps, ID3D10Buffer* ps_cb, ID3D10BlendState* bs, bool linear)
{
	BeginScene();

	// om

	OMSetDepthStencilState(m_convert.dss, 0);
	OMSetBlendState(bs, 0);
	OMSetRenderTargets(dt, NULL);

	// ia

	float left = dr.x * 2 / dt.GetWidth() - 1.0f;
	float top = 1.0f - dr.y * 2 / dt.GetHeight();
	float right = dr.z * 2 / dt.GetWidth() - 1.0f;
	float bottom = 1.0f - dr.w * 2 / dt.GetHeight();

	GSVertexPT1 vertices[] =
	{
		{GSVector4(left, top, 0.5f, 1.0f), GSVector2(sr.x, sr.y)},
		{GSVector4(right, top, 0.5f, 1.0f), GSVector2(sr.z, sr.y)},
		{GSVector4(left, bottom, 0.5f, 1.0f), GSVector2(sr.x, sr.w)},
		{GSVector4(right, bottom, 0.5f, 1.0f), GSVector2(sr.z, sr.w)},
	};

	D3D10_BOX box = {0, 0, 0, sizeof(vertices), 1, 1};

	m_dev->UpdateSubresource(m_convert.vb, 0, &box, vertices, 0, 0);

	IASetVertexBuffer(m_convert.vb, sizeof(vertices[0]));
	IASetInputLayout(m_convert.il);
	IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);

	// vs

	VSSetShader(m_convert.vs, NULL);

	// gs

	GSSetShader(NULL);

	// ps

	PSSetShader(ps, ps_cb);
	PSSetSamplerState(linear ? m_convert.ln : m_convert.pt, NULL);
	PSSetShaderResources(st, NULL);

	// rs

	RSSet(dt.GetWidth(), dt.GetHeight());

	//

	DrawPrimitive(countof(vertices));

	//

	EndScene();
}
开发者ID:0xZERO3,项目名称:PCSX2-rr-lua,代码行数:59,代码来源:GSDevice10.cpp


示例12: EndScene

void DeviceManDX12::Present()
{
	if (!swapChain) {
		return;
	}
	EndScene();
	swapChain->Present(0, 0);
	BeginScene();
}
开发者ID:yorung,项目名称:dx12playground,代码行数:9,代码来源:device_man_dx12.cpp


示例13: EndScene

GraphicsCaptureSource::~GraphicsCaptureSource()
{
    if(warningID)
    {
        API->RemoveStreamInfo(warningID);
        warningID = 0;
    }

    EndScene(); //should never actually need to be called, but doing it anyway just to be safe
}
开发者ID:GarethLewin,项目名称:OBS,代码行数:10,代码来源:GraphicsCaptureSource.cpp


示例14: BeginScene

void GSDevice11::StretchRect(GSTexture* st, const GSVector4& sr, GSTexture* dt, const GSVector4& dr, ID3D11PixelShader* ps, ID3D11Buffer* ps_cb, ID3D11BlendState* bs, bool linear)
{
	BeginScene();

	GSVector2i ds = dt->GetSize();

	// om

	OMSetDepthStencilState(m_convert.dss, 0);
	OMSetBlendState(bs, 0);
	OMSetRenderTargets(dt, NULL);

	// ia

	float left = dr.x * 2 / ds.x - 1.0f;
	float top = 1.0f - dr.y * 2 / ds.y;
	float right = dr.z * 2 / ds.x - 1.0f;
	float bottom = 1.0f - dr.w * 2 / ds.y;

	GSVertexPT1 vertices[] =
	{
		{GSVector4(left, top, 0.5f, 1.0f), GSVector2(sr.x, sr.y)},
		{GSVector4(right, top, 0.5f, 1.0f), GSVector2(sr.z, sr.y)},
		{GSVector4(left, bottom, 0.5f, 1.0f), GSVector2(sr.x, sr.w)},
		{GSVector4(right, bottom, 0.5f, 1.0f), GSVector2(sr.z, sr.w)},
	};

	IASetVertexBuffer(vertices, sizeof(vertices[0]), countof(vertices));
	IASetInputLayout(m_convert.il);
	IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);

	// vs

	VSSetShader(m_convert.vs, NULL);

	// gs

	GSSetShader(NULL);

	// ps

	PSSetShaderResources(st, NULL);
	PSSetSamplerState(linear ? m_convert.ln : m_convert.pt, NULL);
	PSSetShader(ps, ps_cb);

	//

	DrawPrimitive();

	//

	EndScene();

	PSSetShaderResources(NULL, NULL);
}
开发者ID:mauzus,项目名称:progenitor,代码行数:55,代码来源:GSDevice11.cpp


示例15: Clear

		// Renders All objects
		void xSceneManager::RenderAll()
		{
			Clear();
			BeginScene();
			std::for_each(m_SceneNodes.begin(), m_SceneNodes.end(), 
				std::mem_fun(&Impulse::Scene::xSceneNode::Render));
			EndScene();
			Present();
			m_FrameCount++;
			m_TempFrameCount++;
		}
开发者ID:andrewgbliss,项目名称:XImpulse,代码行数:12,代码来源:xSceneManager.cpp


示例16: DrawScene

void DrawScene()
{
	BeginScene(1);
	ImageToScreen(p_bg,0,0);
	DrawImage(p_logo,0,0,0,0,128,0,256,256);
	DrawImageMask(p_logo,0,0,0,0,0/*dx*/,0/*dy*/,128/*dw*/,128/*dh*/,logomask1);
	DrawImageMask(p_logo,0,0,0,0,480-128/*dx*/,272-128/*dy*/,128/*dw*/,128/*dh*/,0x7fffffff);
	DrawImageMask(p_logo,0,0,0,0,0/*dx*/,272-128/*dy*/,128/*dw*/,128/*dh*/,logomask2);
	DrawImageMask(p_logo,0,0,0,0,480-128/*dx*/,0/*dy*/,128/*dw*/,128/*dh*/,logomask2);
	EndScene();
}
开发者ID:eledot,项目名称:libnge2,代码行数:11,代码来源:test.cpp


示例17: BeginScene

bool DX11Render::Frame()
{
	bool result = true;
	
	//Clear buffer
	BeginScene(0.5f, 0.5f, 0.5f, 1.0f);

	//present back buffer
	EndScene();

	return result;
}
开发者ID:darchon,项目名称:Render,代码行数:12,代码来源:DX11Render.cpp


示例18: BeginScene

void RenderSystem::v_Render()
{
	BeginScene();

	m_Camera.DetectInput(m_Timer.GetDeltaTime(), GetHwnd());
	m_Matrix.View  =   m_Camera.GetViewMatrix();
	m_Matrix.Proj  =  m_Proj;

	//////////////////////////////////////////////////////////////////
	XMMATRIX objectModel = XMMatrixTranslation(0.0f, -1.0f, 0.0f);
	XMStoreFloat4x4(&m_Matrix.Model, XMMatrixTranspose(objectModel));
	ObjModel.Render(m_pD3D11DeviceContext, m_Matrix.Model, m_Matrix.View, m_Matrix.Proj);

	m_pD3D11DeviceContext->OMSetBlendState(0, 0, 0xffffffff);


	if (m_Camera.GetRightMouseClicked())
		CheckPick();

	for (int i = 0; i != 20; ++i)
	{
		if (!bottleHit[i])
		{
			XMFLOAT4X4 tempModel;
			XMMATRIX  model = XMMatrixTranspose(bottleModel[i]);
			XMStoreFloat4x4(&tempModel, model);
			BottomModel.Render(m_pD3D11DeviceContext, tempModel, m_View, m_Proj);
		}
	}

	WCHAR scoreInfo[255];
	swprintf(scoreInfo, L"Score: %d ", score);
	m_Font.drawText(m_pD3D11DeviceContext.Get(), scoreInfo, 22.0f, 10.0f, 100.0f, 0xff0099ff);

	////////////////////////////////////////////////////////

	XMMATRIX sphereWorld = XMMatrixIdentity();
	m_Matrix.View._14 = 0.0f;
	m_Matrix.View._24 = 0.0f;
	m_Matrix.View._34 = 0.0f;
	m_Matrix.View._41 = 0.0f;
	m_Matrix.View._42 = 0.0f;
	m_Matrix.View._43 = 0.0f;
	XMStoreFloat4x4(&m_Matrix.Model, XMMatrixTranspose(sphereWorld));

	m_Skymap.Render(m_pD3D11DeviceContext.Get(), m_Matrix);

	///////////////////////////////////////////////////////

	DrawFps();

	EndScene();
}
开发者ID:byhj,项目名称:DirectX11-Lessons,代码行数:53,代码来源:RenderSystem.cpp


示例19: GSVertexPT1

void GSDevice11::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1 (&iaVertices)[4], bool datm)
{
	const GSVector2i& size = rt->GetSize();

	if(GSTexture* t = CreateRenderTarget(size.x, size.y, rt->IsMSAA()))
	{
		// sfex3 (after the capcom logo), vf4 (first menu fading in), ffxii shadows, rumble roses shadows, persona4 shadows

		BeginScene();

		ClearStencil(ds, 0);

		// om

		OMSetDepthStencilState(m_date.dss, 1);
		OMSetBlendState(m_date.bs, 0);
		OMSetRenderTargets(t, ds);

		// ia

		IASetVertexBuffer(iaVertices, sizeof(iaVertices[0]), countof(iaVertices));
		IASetInputLayout(m_convert.il);
		IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);

		// vs

		VSSetShader(m_convert.vs, NULL);

		// gs

		GSSetShader(NULL);

		// ps

		GSTexture* rt2 = rt->IsMSAA() ? Resolve(rt) : rt;

		PSSetShaderResources(rt2, NULL);
		PSSetSamplerState(m_convert.pt, NULL);
		PSSetShader(m_convert.ps[datm ? 2 : 3], NULL);

		//

		DrawPrimitive();

		//

		EndScene();

		Recycle(t);

		if(rt2 != rt) Recycle(rt2);
	}
}
开发者ID:mauzus,项目名称:progenitor,代码行数:53,代码来源:GSDevice11.cpp


示例20: CloseHandle

GraphicsCaptureSource::~GraphicsCaptureSource()
{
    if (injectHelperProcess)
        CloseHandle(injectHelperProcess);

    if (warningID)
    {
        //API->RemoveStreamInfo(warningID);
        warningID = 0;
    }

    EndScene(); //should never actually need to be called, but doing it anyway just to be safe
}
开发者ID:cha007,项目名称:obs_,代码行数:13,代码来源:GraphicsCaptureSource.cpp



注:本文中的EndScene函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ EndTimeSlice函数代码示例发布时间:2022-05-30
下一篇:
C++ EndQuery函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap