本文整理汇总了C++中CD3DTexture::deinit方法的典型用法代码示例。如果您正苦于以下问题:C++ CD3DTexture::deinit方法的具体用法?C++ CD3DTexture::deinit怎么用?C++ CD3DTexture::deinit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CD3DTexture
的用法示例。
在下文中一共展示了CD3DTexture::deinit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinProc
// WinProc
LRESULT CALLBACK WinProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
const float kMoveAmt = 0.05f; // Amount to move light by
switch(message)
{
case WM_SYSKEYDOWN:
// Toggle on ALT + ENTER
if(wparam == VK_RETURN && (lparam & (1 << 29)))
{
// Shut down are render texture and render target
gShadowMap.deinit();
gRenderTarget.deinit();
g3D->toggleFullScreen(); // Toggle!
// Reinitialize the render texture and target
gShadowMap.createRenderTexture(512, 512, D3DFMT_R32F);
gRenderTarget.init(512, 512, D3DFMT_R32F, D3DFMT_D24S8);
g3D->setViewMatrix(kEyePos, CPos(0.0f, 0.0f, 0.0f)); // Reset the view of our scene
return 0;
}
break; // Allow other system keys to be handled by DefWindowProc()
case WM_KEYDOWN:
switch(wparam)
{
case VK_LEFT: // Move the light along the -X axis
gLightPos.x -= kMoveAmt;
break;
case VK_RIGHT: // Move the light along the +X axis
gLightPos.x += kMoveAmt;
break;
case VK_UP: // Move the light along the +Z axis
gLightPos.z += kMoveAmt;
break;
case VK_DOWN: // Move the light along the -Z axis
gLightPos.z -= kMoveAmt;
break;
case VK_ESCAPE:
SendMessage(hwnd, WM_CLOSE, 0, 0);
break;
}
return 0;
case WM_DESTROY:
{
PostQuitMessage(0);
return 0;
}
}
return DefWindowProc(hwnd, message, wparam, lparam);
}