本文整理汇总了C++中Pipeline::GetVPTrans方法的典型用法代码示例。如果您正苦于以下问题:C++ Pipeline::GetVPTrans方法的具体用法?C++ Pipeline::GetVPTrans怎么用?C++ Pipeline::GetVPTrans使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pipeline
的用法示例。
在下文中一共展示了Pipeline::GetVPTrans方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderSceneCB
virtual void RenderSceneCB()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
m_pGameCamera->OnRender();
Pipeline p;
p.WorldPos(-3.0f, 0.0f, 0.0f);
p.Scale(2.0f, 2.0f, 2.0f);
p.Rotate(-90.0f, 15.0f, 0.0f);
p.SetCamera(m_pGameCamera->GetPos(), m_pGameCamera->GetTarget(), m_pGameCamera->GetUp());
p.SetPerspectiveProj(m_persProjInfo);
m_lightingEffect.SetEyeWorldPos(m_pGameCamera->GetPos());
m_lightingEffect.SetVP(p.GetVPTrans());
m_lightingEffect.SetWorldMatrix(p.GetWorldTrans());
m_lightingEffect.SetTessellationLevel(m_tessellationLevel);
m_pMesh->Render(NULL);
p.WorldPos(3.0f, 0.0f, 0.0f);
p.Rotate(-90.0f, -15.0f, 0.0f);
m_lightingEffect.SetVP(p.GetVPTrans());
m_lightingEffect.SetWorldMatrix(p.GetWorldTrans());
m_lightingEffect.SetTessellationLevel(1.0f);
m_pMesh->Render(NULL);
glutSwapBuffers();
}
示例2: RenderSceneCB
virtual void RenderSceneCB()
{
long long TimeNowMillis = GetCurrentTimeMillis();
assert(TimeNowMillis >= m_currentTimeMillis);
unsigned int DeltaTimeMillis = (unsigned int)(TimeNowMillis - m_currentTimeMillis);
m_currentTimeMillis = TimeNowMillis;
m_pGameCamera->OnRender();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
m_pLightingTechnique->Enable();
m_pTexture->Bind(COLOR_TEXTURE_UNIT);
m_pNormalMap->Bind(NORMAL_TEXTURE_UNIT);
Pipeline p;
p.Scale(20.0f, 20.0f, 1.0f);
p.Rotate(90.0f, 0.0, 0.0f);
p.SetCamera(m_pGameCamera->GetPos(), m_pGameCamera->GetTarget(), m_pGameCamera->GetUp());
p.SetPerspectiveProj(m_persProjInfo);
m_pLightingTechnique->SetWVP(p.GetWVPTrans());
m_pLightingTechnique->SetWorldMatrix(p.GetWorldTrans());
m_pGround->Render();
m_particleSystem.Render(DeltaTimeMillis, p.GetVPTrans(), m_pGameCamera->GetPos());
glutSwapBuffers();
}
示例3: Render
void Chunks::Render(Pipeline p, StaticShadowVolumeShader* shadowShader)
{
shadowShader->Enable();
shadowShader->SetVP(p.GetVPTrans());
shadowShader->SetWorldMatrix(p.GetWorldTrans());
for (int i = 0; i < VIEW_DISTANCE / CHUNK_SIZE_X * 2; i++)
{
for (int j = 0; j < VIEW_DISTANCE / CHUNK_SIZE_Z * 2; ++j)
{
Get(i,j)->Render();
}
}
}