   3d surface appearing transparent
  I want a graph like the following which is not see through:http://tabishfayyaz.googlepages.com/graphNormal.JPGbut I get the following:http://tabishfayyaz.googlepages.com/graphSeeThrough.JPGI think I need to set some property but can't figure out which one and what is this behavior called. This is a x^2*y^2 graph.   
  You need to enable backface culling. Somewhere in your code you have:pDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);Remove it.Failing that, you may need to use a Z-buffer (It's a bit hard to see if it's needed from your pic).   ;  This is the state of my properties:d3dManager.device.RenderState.CullMode = Cull.None;d3dManager.device.RenderState.ZBufferEnable = true;The Cull Mode options available areCull.ClockwiseCull.CounterClockwiseI had to choose Cull.None cause otherwise the back side of my graph are not shown which I need to see.;Quote:Original post by tfmThis is the state of my properties:d3dManager.device.RenderState.CullMode = Cull.None;d3dManager.device.RenderState.ZBufferEnable = true;The Cull Mode options available areCull.ClockwiseCull.CounterClockwiseI had to choose Cull.None cause otherwise the back side of my graph are not shown which I need to see.What you're seeing there is the back side of the triangles. If you need Cull.None to get your graph rendering properly, then your triangles probably have the wrong winding order. What parts can't you see with culling on?   ;  I think I don't see the back side, see the difference between the two:with Cull.None:http://tabishfayyaz.googlepages.com/Cull.None.JPGwith Cull.Clockwise:http://tabishfayyaz.googlepages.com/Cull.Clockwise.JPGThanks a lot for your help;  It seems to me that what you are looking for is depth masking, with back-face culling left off.I'm not sure how this might be enabled in DirectX (having learned OpenGL first, and not having seen a reason to shift from one to the other), but I do think that enabling depth masking should solve your problem - presuming that the DirectX doesn't handle this in some other way that eludes me, I suppose.   ;  Have you got z write enable on?   ;  yeahz write enable is on:d3dManager.device.RenderState.ZBufferEnable = true;   ;  Are you creating the device with depth buffer? Please show your initialization and rendering code. As last resort, sort your triangles by depth and render them from back to front.   ;  Initialization Code: parameters = new PresentParameters(); parameters.Windowed = true; parameters.BackBufferWidth = width; parameters.BackBufferHeight = height; parameters.BackBufferFormat = Format.X8R8G8B8; parameters.BackBufferCount = 1; parameters.ForceNoMultiThreadedFlag = false; //no multi threading parameters.SwapEffect = SwapEffect.Discard; parameters.MultiSample = MultiSampleType.None; parameters.MultiSampleQuality = 0; //parameters.DeviceWindow = control; parameters.EnableAutoDepthStencil = true; parameters.AutoDepthStencilFormat = DepthFormat.D16; parameters.PresentFlag = PresentFlag.None; parameters.FullScreenRefreshRateInHz = 0; parameters.PresentationInterval = PresentInterval.One;  //exception raised if CreateFlags.MixedVertextProcessing device = new Device(0, DeviceType.Hardware, new Form(), CreateFlags.SoftwareVertexProcessing, parameters); device.DeviceResizing += new System.ComponentModel.CancelEventHandler(CancelAutoResizeEvent);Rendering Code:  if (this.plotType == Constants.PLOT_3D)  { short[] indices = new short[24 * 24 * 6]; //for (int i = 0; i < verticesFromMaple.Count; ++i) //{ //    Console.WriteLine(i + ": " + verticesFromMaple.X + " " + verticesFromMaple.Y); //} for (short i = 0, j = 0, k = 0; k < 24*24; ++k, j += 6) //24 * 24 {if (i % 25 == 24){    indices[j] = (short)(i + 1);    i = (short)(i + 1);//Console.Write(indices[j] + " ");}else{    indices[j] = (short)i;  //Console.Write(indices[j] + " ");}indices[j + 1] = (short)(indices[j] + 25); //Console.Write(indices[j + 1] + " ");indices[j + 2] = (short)(indices[j + 1] - 24);  //Console.Write(indices[j + 2] + " ");indices[j + 3] = (short)(indices[j + 2] + 25);  //Console.Write(indices[j + 3] + " ");indices[j + 4] = (short)(indices[j + 3] - 25);  //Console.Write(indices[j + 4] + " ");indices[j + 5] = (short)(indices[j + 4] + 24);  //Console.Write(indices[j + 5] + " ");++i;//Console.WriteLine(""); } mesh = new Mesh(indices.Length, this.verticesFromMaple.Count, 0, VertexFormats.Position | VertexFormats.Diffuse, d3dManager.device); mesh.SetVertexBufferData(this.verticesFromMaple.ToArray(), LockFlags.None); mesh.SetIndexBufferData(indices, LockFlags.None); int[] adjacency = new int[mesh.NumberFaces * 3]; mesh.GenerateAdjacency(0.01F, adjacency); mesh.OptimizeInPlace(MeshFlags.OptimizeVertexCache, adjacency); numSubSets = mesh.GetAttributeTable().Length;