• Advertisement
Sign in to follow this  

Problem with ZFighting / ZBuffer?

This topic is 695 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

I was trying update a game with dx6 to use dx9, and the unique problem I found is when I move camera and some textures bug. If i use dx6 all be correct again...

 

b249c94fb8.jpg

 

And when move the camera:

579e37bf91.jpg

 

I think what could be the z buffer, but is right:

lpD3DDev->SetRenderState( D3DRENDERSTATE_ZENABLE, TRUE );
lpD3DDev->SetRenderState( D3DRENDERSTATE_ZWRITEENABLE, TRUE );
lpD3DDev->SetRenderState( D3DRENDERSTATE_ZFUNC, D3DCMP_LESSEQUAL );
d3dPP.BackBufferFormat			= d3dDM.Format;
d3dPP.EnableAutoDepthStencil	= TRUE;
d3dPP.AutoDepthStencilFormat	= D3DFMT_D16;
d3dPP.BackBufferWidth			= iResoW;
d3dPP.BackBufferHeight			= iResoH;
d3dPP.BackBufferCount			= 1;

Someone have some idea what can be? Thanks..

Share this post


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

  • Advertisement