Original Post
I have a problem. When Visual Studio .NET runs my program in debug mode (and in release) it skips lines of code. What is wrong? I have tried other applications with the same function and it works. But not with this program. HELP ME! /Zalthar
////////////////////////////////////////////////////////////
// CreateD3DDevice()
////////////////////////////////////////////////////////////
HRESULT CDirect3D::CreateD3DDevice()
{
// ================= INSTEAD OF STARTING HERE!!!
D3DPRESENT_PARAMETERS D3DPresent_Params;
ZeroMemory(&D3DPresent_Params, sizeof(D3DPRESENT_PARAMETERS));
D3DPresent_Params.Windowed = FALSE;
D3DPresent_Params.BackBufferCount = y;
D3DPresent_Params.BackBufferWidth = 640;
D3DPresent_Params.BackBufferHeight = 480;
D3DPresent_Params.BackBufferFormat = D3DFMT_X8R8G8B8;
D3DPresent_Params.SwapEffect = D3DSWAPEFFECT_DISCARD;
D3DPresent_Params.hDeviceWindow = m_hWnd;
HRESULT hResult = m_pD3D->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL, m_hWnd,
// ================= IT STARTS HERE!!!
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&D3DPresent_Params, &m_pD3DDevice);
if (FAILED(hResult))
{
MessageBox(m_hWnd, "Failed to create Direct3D device.",
"DirectX Error", MB_OK);
strcpy(m_szErrorMsg, "CreateD3DDevice()");
return hResult;
}
return hResult;
}