Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. D3DPRESENT_PARAMETERS pp;
  2. ZeroMemory( &pp, sizeof(D3DPRESENT_PARAMETERS) );
  3. pp.BackBufferFormat = D3DFMT_UNKNOWN;
  4. pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  5. pp.Windowed = TRUE;
  6.  
  7. HWND focusWndHnd = GetConsoleWindow();
  8.  
  9. if ( focusWndHnd == NULL && pp.hDeviceWindow == NULL )
  10. {
  11. focusWndHnd = ::GetDesktopWindow();
  12. }
  13.  
  14.  
  15. IDirect3DDevice9* pd3dDevice;
  16.  
  17. IDirect3D9* pD3D = Direct3DCreate9( D3D_SDK_VERSION );
  18.  
  19. hr = pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_NULLREF, focusWndHnd,
  20. D3DCREATE_SOFTWARE_VERTEXPROCESSING|D3DCREATE_FPU_PRESERVE, &pp, &pd3dDevice );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement