本文整理汇总了C++中Sky::CreateSkySRV方法的典型用法代码示例。如果您正苦于以下问题:C++ Sky::CreateSkySRV方法的具体用法?C++ Sky::CreateSkySRV怎么用?C++ Sky::CreateSkySRV使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sky
的用法示例。
在下文中一共展示了Sky::CreateSkySRV方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderScene
void CubeMap::RenderScene(){
m_d3dDeviceContext->ClearRenderTargetView(m_renderTargetView, reinterpret_cast<const float*>(&COLORS::Silver));
m_d3dDeviceContext->ClearDepthStencilView(m_depthStencilView, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
m_d3dDeviceContext->IASetInputLayout(InputLayouts::Basic);
m_d3dDeviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
UINT stride = sizeof(Vertex::Basic);
UINT offset = 0;
m_camera.UpdateViewMat();
XMMATRIX view = m_camera.getViewMat();
XMMATRIX proj = m_camera.getProjMat();
XMMATRIX viewproj = m_camera.getViewProjMat();
float blendFactor[] = { 0.0f, 0.0f, 0.0f, 0.0f};
//Set Per frame constants
Effects::BasicFX->setDirLights(m_dirLights);
Effects::BasicFX->setEyePosVec(m_camera.getPosition());
Effects::BasicFX->setCubeMap(m_sky->CreateSkySRV());
m_sky->Draw(m_d3dDeviceContext, m_camera);
//restore default states, as the SkyFX changes them in the effect file.
m_d3dDeviceContext->RSSetState(0);
m_d3dDeviceContext->OMSetDepthStencilState(0, 0);
HR(m_swapChain->Present(0, 0));
}