Work in progress
Project Description
The XNADeviceEnumeration Component helps you out to do a basic graphics device enumeration and is delivered with a WPF-Application shown some functions!The component is written with XNA 3.0 beta. Maybe i will also publish a 2.0 version. To execute the demo application you need the .NET 3.5 Framework Runtimes.
There is a german translation of the component and the demo application description available on my blog.
GraphicsDevice Enumeration!Why should you do so?
One major difference between XNA developement for pc and XBOX is that you can't know on which hardware your application/game/engine will run. If your're developing for the XBOX you can surely trust that there is the same hardware everywhere. Sure thats the same for all consoles on the market.
If you like to run you're game or graphic application on the pc you have to noticed that there a lot of really different systems out there(not only the graphicsdevice for sure). So you can't trust in that you can render your scene with 4xAA(MultiSample) everywhere just because on your system it works fine. Furthermore not all MultiSampleTypes works with all Depth/Z-Buffers for example. There are a lot more examples for such reason but i think you know now why a basic device enumeration is usefull.
How could the Component helps out
Such a component is more a laborious task and encaspsulte methods to check device properties faster and with less work for you!
Features:
- general
- Easy to use and integrate in your game/engine
- Documentation
- demo application
- enumeration
- Adapterenumeration(name, driver etc.)
- Videomodus(resolutions, surrfaceformats etc.)
- Checks a device on specific resolution or format
- DeviceType
- BackBuffers
- Depth/Z and Stencil Buffers
- MultiSample(type and qualitylevel)
- Converter
- for AspectRatio
- Formatconverter for all Back/Z/Stencil Buffers (to 'old', more intuitive D3D formatlabeling)
I recommend to use this component as an Singleton or static to get access from overall!
The demo enumeration application
This demo application shows you how to use the basic features of the component. Sure this demo is more for academic use and it's not recommended to use it to show the user of your applications. The demo also display the hierarchic dependency between the enumeration parts. So i.e. if you change the BackBufferformat it's important that you have to test the availability of the Depth/Stencil Buffers and the MultiSampleTypes again.
The Hierachy:
- 1. The adapter
- 2. The Videomode
- 3. The DeviceType
- 4. BackBufferFormats
- 5. Depth and Stecil Formats
- 6. MultiSampleType and Qualitylevel
If there are any bugs, suggestions or questions please feel free to contact me or write a comment. Thanks!