当前位置: 首页>>代码示例>>C++>>正文


C++ EndScene函数代码示例

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


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


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