Advertisement Jump to content
Sign in to follow this  

DirectX (DXUT) problem

This topic is 3368 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
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 =
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

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!