zbuffer problem

Started by
5 comments, last by Zviri 14 years, 8 months ago
Hi, I'm making a program using c# (Microsoft V. C# EE) and directX SDK 2008(november) the program works great but only on a few computers. Most of the computers on which it doesn't work have an integrated GC (just observation). The only way I can fix it is to stop using the zbuffer or make a referenced directX device but then the program need an instaled directX SDK and that's a bit impractical. Is there anything I can do? when it is necessary I can upload the whole code/project here is my directX device initialision procedure: private void InitializeDevice() { PresentParameters parameters = new PresentParameters(); parameters.AutoDepthStencilFormat = DepthFormat.D16; parameters.EnableAutoDepthStencil = true; parameters.Windowed = true; parameters.SwapEffect = SwapEffect.Discard; parameters.MultiSample = MultiSampleType.EightSamples; m_Device = new Device(0, DeviceType.Hardware, this.placeHolder, CreateFlags.HardwareVertexProcessing, parameters); } the placHolder is an User Control I've tried different types of FrameWork and DirectX SDK but it's no use The Error when it breaks down says only: Application Error thx
Advertisement
What do the debug runtimes say?

Are you checking device capabilities at all?

MultiSampleType.EightSamples is not supported by a lot of low-end hardware, try switching to None, if you really must have AA then stick with 2 or 4 samples.
Even without parameters.MultiSample = MultiSampleType.EightSamples;
it isn't working the program start working only when I disable AutoDepthStencil
I don't know what says the debug runtime because I don't have such a pc at home, I've send it to 7 different people and the program worked only 3 of them.

Is it possible that the low-end hardware doesn't support the zbuffer?

It may not support 16-bit depth buffers, it may not support the depth buffer with some other setting you've set... it could be any number of things.

This is why the debug runtimes are needed.
I tried all possible DepthFormats still the same,
Ok I will get the debug runtimes somehow
Quote:Original post by Zviri
Is it possible that the low-end hardware doesn't support the zbuffer?
It's very unlikely. What's more likely is the particular configuration you have is unsupported. The card may not support 16-bit depth buffers, might not support 16-bit depth buffers with a 32-bit backbuffer, etc.

If you can't get the debug runtimes installed on one of the PCs it fails on (That'll require installing the SDK on that PC), at least check your return codes (Or catch exceptions, I'm not sure how MDX/SlimDX works) - that'll tell you what function is failing and why.
Quote:Original post by Evil Steve
Quote:Original post by Zviri
Is it possible that the low-end hardware doesn't support the zbuffer?
It's very unlikely. What's more likely is the particular configuration you have is unsupported. The card may not support 16-bit depth buffers, might not support 16-bit depth buffers with a 32-bit backbuffer, etc.

If you can't get the debug runtimes installed on one of the PCs it fails on (That'll require installing the SDK on that PC), at least check your return codes (Or catch exceptions, I'm not sure how MDX/SlimDX works) - that'll tell you what function is failing and why.


Thank u so much :) that was the problem I didn't set the backBufferFormat, now I've set it to 16 bit R5G6B5 format and it work's perfectly.
Now I see that it is a very trivial mistake but I'm just starting with directX and I've read at least 5 DX tutorials and there wasn't one word about it.

thx for all your help

This topic is closed to new replies.

Advertisement