Sign in to follow this  
Zviri

zbuffer problem

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this