// get the number of modes we have on the device UINT num = m_pD3D->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8); // enumerate available devices m_pD3D->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8, num-1, &m_display);Im using the assumption that the last mode is the highest resolution and bit depth. This seems to be the case and it works great, except for on my laptop where the LCD cant display the highest resolution supported. What I want to do is have a setup file where the resolution is stored. What I want to know is how do I change the above code to get the best mode in a defined resolution? --- The second question is that I currently compile with the following line of code:
// Create the Direct3D device // Assumptions made: using default adapter // the card can support hardware vertex processing if (FAILED(m_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &m_d3dpp, &m_pd3dDevice))) return E_FAIL; // failureI would like to change it so that it will use hardware vertex processing when it is supported by the graphics card in the system, otherwise use software vertex processing. How would I do this? --- Thanks in advance. Kieran [edited by - Kieran on January 13, 2004 9:53:18 AM]