本文整理汇总了C++中CScene::OnD3D11CreateDevice方法的典型用法代码示例。如果您正苦于以下问题:C++ CScene::OnD3D11CreateDevice方法的具体用法?C++ CScene::OnD3D11CreateDevice怎么用?C++ CScene::OnD3D11CreateDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CScene
的用法示例。
在下文中一共展示了CScene::OnD3D11CreateDevice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CDXUTTextHelper
//--------------------------------------------------------------------------------------
// Create any D3D11 resources that aren't dependent on the back buffer
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D11CreateDevice(ID3D11Device* pd3dDevice, const DXGI_SURFACE_DESC* /*pBackBufferSurfaceDesc*/,
void* /*pUserContext*/)
{
HRESULT hr;
ID3D11DeviceContext* pd3dImmediateContext = DXUTGetD3D11DeviceContext();
V_RETURN(g_DialogResourceManager.OnD3D11CreateDevice(pd3dDevice, pd3dImmediateContext));
V_RETURN(g_D3DSettingsDlg.OnD3D11CreateDevice(pd3dDevice));
g_pTxtHelper = new CDXUTTextHelper(pd3dDevice, pd3dImmediateContext, &g_DialogResourceManager, 15);
V_RETURN(g_Scene.OnD3D11CreateDevice(pd3dDevice));
// Setup the camera
XMVECTOR vecEye = XMVectorSet(0.0f, 0.5f, -3.0f, 0);
XMVECTOR vecAt = XMVectorSet(0.0f, 0.0f, 0.0f, 0);
g_Camera.SetViewParams(vecEye, vecAt);
g_OIT.OnD3D11CreateDevice(pd3dDevice);
return S_OK;
}