Possible Culling Problem

Coding4Fun posted code called "BattleTank 2005", it gives a great example for simple camera movement and importing of Xfiles. The Xfiles are all white because no lighting is provided in the prog. I added these lines to allow for lighting

taken from http://www.gotdotnet.com/team/directx/learn/tutorials/helloteapot.aspx

            device.RenderState.ZBufferEnable = true;
            //    enable lighting
            device.RenderState.Lighting = true;
            //    set the ambient color
            device.RenderState.Ambient = Color.Gray;

            //    configure a directional light
            device.Lights[0].Type = LightType.Directional;
            device.Lights[0].Direction = new Vector3(2.0f, -1.0f, 0.0f);
            device.Lights[0].Diffuse = Color.White;
            device.Lights[0].Enabled = true;
            device.Lights[0].Update();

note that the last line used to be .Commit() but DirectX 2.0.0.0 doesnlt have a .Commit() method.

This kind of works, but the objects have what looks like culling issues, though in the BattleTank example culling is set to None. Anyone got any Ideas

 

 



Answer this question

Possible Culling Problem

  • Kyle101

    Put a screen shot up somewhere so we can see what the problem looks like.



  • Possible Culling Problem