• Advertisement
Sign in to follow this  

DirectX (DXUT) problem

This topic is 3034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear friends, I opened an empty DXUT (Which can be found from directX SDK sample browser) project. I drew a simple cube with DrawPrimitive. but the cube is transparent. What's the problem? I'm exhausted. When I don't use DXUT, the cube is concrete and OK. But in DXUT project it doesn't work.

Share this post


Link to post
Share on other sites
Advertisement
I tested cull mode by all possible values. Here is all the settings:

bool CALLBACK ModifyDeviceSettings( DXUTDeviceSettings* pDeviceSettings,
const D3DCAPS9* pCaps, void* pUserContext )
{
pDeviceSettings->pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
pDeviceSettings->pp.EnableAutoDepthStencil = TRUE;
pDeviceSettings->pp.AutoDepthStencilFormat = D3DFMT_D16;
pDeviceSettings->pp.PresentationInterval =
D3DPRESENT_INTERVAL_IMMEDIATE;
return true;
}


HRESULT CALLBACK OnResetDevice( IDirect3DDevice9* pd3dDevice,
const D3DSURFACE_DESC* pBackBufferSurfaceDesc,
void* pUserContext )
{
pd3dDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );
pd3dDevice->SetRenderState( D3DRS_LIGHTING, FALSE );

return S_OK;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement