Direct3D 장치 g 생성pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,

941 단어 DirectX
int main(int argc, char* argv[])  
{  
  WinMain(GetModuleHandle(0),NULL,NULL,0);  
  return 0;  
}  


//       
    HWND hWnd = CreateWindow("DX Project 1", "www.andypike.com: Tutorial 1", 
                              WS_OVERLAPPEDWINDOW, 50, 50, 500, 500,
                              GetDesktopWindow(), NULL, wc.hInstance, NULL);

    //Initialize Direct3D
//   Direct3D
    if(SUCCEEDED(InitialiseD3D(hWnd)))
    { 
        //Show our window
//       
        ShowWindow(hWnd, SW_SHOWDEFAULT);
        UpdateWindow(hWnd);

        //Start game running: Enter the game loop
//       :      
        GameLoop();
    }
/

HRESULT InitialiseD3D(HWND hWnd)

//    Direct3D  
    if(FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, 
                                   D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &g_pD3DDevice)))
    {
        return E_FAIL;
    }

좋은 웹페이지 즐겨찾기