提交 e50ea21e 编写于 作者: GamebabyRockSun_QQ's avatar GamebabyRockSun_QQ

修正了几个今天提交后的警告信息

上级 f61b4ecb
......@@ -671,8 +671,8 @@ void OnSize(UINT width, UINT height, bool minimized)
// 8、更新视口大小和齐次包围盒大小
g_stGPUStatus.m_stViewPort.TopLeftX = 0.0f;
g_stGPUStatus.m_stViewPort.TopLeftY = 0.0f;
g_stGPUStatus.m_stViewPort.Width = g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stViewPort.Width = (float)g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = (float)g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stScissorRect.left = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX);
g_stGPUStatus.m_stScissorRect.right = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX + g_stGPUStatus.m_stViewPort.Width);
......
......@@ -682,8 +682,8 @@ void OnSize(UINT width, UINT height, bool minimized)
// 8、更新视口大小和齐次包围盒大小
g_stGPUStatus.m_stViewPort.TopLeftX = 0.0f;
g_stGPUStatus.m_stViewPort.TopLeftY = 0.0f;
g_stGPUStatus.m_stViewPort.Width = g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stViewPort.Width = (float)g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = (float)g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stScissorRect.left = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX);
g_stGPUStatus.m_stScissorRect.right = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX + g_stGPUStatus.m_stViewPort.Width);
......
......@@ -792,7 +792,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR l
// 填充每实例数据
//创建 Per Instance Data 仅使用Upload隐式堆 iRowCnts行 * iColCnts列个实例
g_stBufferResSesc.Width = iRowCnts * iColCnts * sizeof(ST_GRS_PER_INSTANCE);
g_stBufferResSesc.Width = (UINT64)(iRowCnts * iColCnts * sizeof(ST_GRS_PER_INSTANCE));
GRS_THROW_IF_FAILED(pID3D12Device4->CreateCommittedResource(
&g_stUploadHeapProps
, D3D12_HEAP_FLAG_NONE
......@@ -1153,8 +1153,8 @@ void OnSize(UINT width, UINT height, bool minimized)
// 8、更新视口大小和齐次包围盒大小
g_stGPUStatus.m_stViewPort.TopLeftX = 0.0f;
g_stGPUStatus.m_stViewPort.TopLeftY = 0.0f;
g_stGPUStatus.m_stViewPort.Width = g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stViewPort.Width = (float)g_stGPUStatus.m_iWndWidth;
g_stGPUStatus.m_stViewPort.Height = (float)g_stGPUStatus.m_iWndHeight;
g_stGPUStatus.m_stScissorRect.left = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX);
g_stGPUStatus.m_stScissorRect.right = static_cast<LONG>(g_stGPUStatus.m_stViewPort.TopLeftX + g_stGPUStatus.m_stViewPort.Width);
......
......@@ -336,7 +336,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR l
RegisterClassEx(&wcex);
DWORD dwWndStyle = WS_OVERLAPPED | WS_SYSMENU;
RECT rtWnd = { 0, 0, nWndWidth, nWndHeight };
RECT rtWnd = { 0, 0, (LONG)nWndWidth, (LONG)nWndHeight };
AdjustWindowRect(&rtWnd, dwWndStyle, FALSE);
// 计算窗口居中的屏幕坐标
......@@ -1645,7 +1645,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR l
stGPUParams[nIDGPUMain].m_pICmdList->ResourceBarrier(1, &stRTVStateTransBarrier);
D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = stGPUParams[nIDGPUMain].m_pIDHRTV->GetCPUDescriptorHandleForHeapStart();
rtvHandle.ptr += (nCurrentFrameIndex * stGPUParams[nIDGPUMain].m_nszRTV);
rtvHandle.ptr += (SIZE_T)(nCurrentFrameIndex * stGPUParams[nIDGPUMain].m_nszRTV);
D3D12_CPU_DESCRIPTOR_HANDLE stDSVHandle = stGPUParams[nIDGPUMain].m_pIDHDSVTex->GetCPUDescriptorHandleForHeapStart();
stGPUParams[nIDGPUMain].m_pICmdList->OMSetRenderTargets(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册