Thread: C++ DirectX 9 3D z-buffer issues?

  1. #1
    Registered User
    Join Date
    Mar 2006

    C++ DirectX 9 3D z-buffer issues?

    I'm trying to make a movable model of a robotic arm. I have 5 or so pieces (meshes), and in the D3D mesh viewer (pic 1 below), the meshes appear OK. Also, at runtime, when zoomed in (pic 2 below), the meshes are OK. But when zoomed a little farther out (pic 3 below), the black servos show through the sides of the silver metal links. I was thinking the problem had to do with the z-buffer or lighting, but I am just starting this. My render states are also at the bottom.

    Picture 1

    Picture 2

    Picture 3

    	pD3dDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
    	pD3dDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_XRGB(250, 250, 250));
    	pD3dDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    	pD3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
    	pD3dDevice->SetRenderState(D3DRS_LIGHTING, TRUE);
    	pD3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE);

  2. #2
    Registered User
    Join Date
    Feb 2008
    hi jrbarr,

    Are you still having this issue? If not, how did you resolve it?


  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    I seriously doubt that jrbarr is ever going to see this thread again, but you might try elsewhere. Some searching revealed these:

    Looks like some java was involved . . . .

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Wow nearly a 2 year bump.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wiki FAQ
    By dwks in forum A Brief History of
    Replies: 192
    Last Post: 04-29-2008, 01:17 PM
  2. Simple (?) problem rendering a vertex buffer
    By Dark_Phoenix in forum Game Programming
    Replies: 4
    Last Post: 08-11-2007, 07:32 PM
  3. Isometric Tile Engine using DirectX
    By Wraithan in forum Game Programming
    Replies: 3
    Last Post: 07-17-2006, 12:16 PM
  4. Directx issues
    By dpro in forum Game Programming
    Replies: 7
    Last Post: 03-30-2005, 01:58 PM
  5. Tetris Questions
    By KneeGrow in forum Game Programming
    Replies: 19
    Last Post: 10-28-2003, 11:12 PM