mesh is crash rendered?

Started by
19 comments, last by Say 18 years, 8 months ago
Now the problem happen again...
I've changed a little the code but fixing other bugs.
How can fix it? What does it depend by?
when i use more presentparams for more swap chains i start the device in the same way, that is so:

// presentParams = presentParams[0] and presentParams[1]
device = new Device(0, DeviceType.Hardware, this, flags, presentParams);
Advertisement
I also have a weird mesh problem, but i have never had this before. When the mesh is rendered, everything looks correct, even the textures are aplied correctly, but where therer is an area that uses a material, such as a blue color, it doesn't draw it.
I really don't know my problem, but does it have to do with loading the x file, or the setup of the lights.
~Mark Schadler
that problem (mine) happen just when i resize the window.
I call this:

		public void OnResizingDevice()		{			if(initializedDirect3D)			{				pause = false;				Reset_Present_Params();				device.Reset(presentParams);			}		}		private void Reset_Present_Params()		{						DisplayMode mode = new DisplayMode();			presentParams[0].BackBufferFormat = mode.Format;			presentParams[0].BackBufferWidth = panel1.Width;			presentParams[0].BackBufferHeight = panel1.Height;			presentParams[0].EnableAutoDepthStencil = true;			presentParams[0].AutoDepthStencilFormat = DepthFormat.D16;						presentParams[1].BackBufferFormat = mode.Format;			presentParams[1].BackBufferWidth = panel2.Width;			presentParams[1].BackBufferHeight = panel2.Height;			presentParams[1].EnableAutoDepthStencil = true;			presentParams[1].AutoDepthStencilFormat = DepthFormat.D16;		}


where are bugs?

Clear your Stencil buffer. I've had that same problem, and the image that got rendered had that exact aspect.

Clear you stencil buffer, or, if you're not using it at all, disable Stencil Checking.
I guess i'm not using it.
How can i disable Stencil Checking?

[Edited by - Say on August 2, 2005 12:59:03 PM]
Quote:Original post by Say
I guess i'm not using it.
How can i disable Stencil Checking?


I'm sorry Say, I'm an OpenGL coder, so you'll have to ask some other GDNetter what the code is to turn off Stencil Checks... :(
so someone know?
I've found this:
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, System.Drawing.Color.DarkGray, 1.0f, 0);

i've tried to use this
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer | ClearFlags.Stencil, System.Drawing.Color.DarkGray, 1.0f, 0);
but it goes in crash!! please someone
i need to repair this bug, i know it is a stupid bug and it can be happened to everybody so someone hve t know how fix.
I guess it's handled by using 2 chain swap so 2 backbuffer.
But where i forget to clear something, where i forget to do something somewhere... please some advice, please.
If you only use 1 chain, does the problem still occur. That looks to me like an issue with clearing the xbuffer, but you are obviously doing so. Seem like a very strange problem. Have you tried rendering the same mesh without a swap chain (just render the first window)?
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute

This topic is closed to new replies.

Advertisement