Reputation: 11482
i want to check whether a concrete DirectX Version (e.g DirectX 9) or a concrete OpenGL Version is suppported on the current windows system (to runtime of course).
Upvotes: 3
Views: 1722
Reputation: 11120
OpenGL and DirectX is present all Windows Systems. But the capability to execute particular extentions or using capabilities are depends on hardware. It's possible to you query the particular feature and use the features. It differs from one machine to other.
You can get the device parameters in Direct using GetDeviceCaps function and other related Direct3D APIs. Please see the sample. http://www.codesampler.com/dx9src/dx9src_1.htm#dx9_initialization
You can know the device capabilities with glGetString. http://www.codesampler.com/oglsrc/oglsrc_1.htm#ogl_initialization
Upvotes: 3
Reputation: 6597
For OpenGL you can:
OpenGL also provides a mechanism for detecting the OpenGL version at run time. An app may call glGetString(GL_VERSION), and parse the return string.
http://www.opengl.org/resources/faq/technical/extensions.htm
For DirectX I have very limited experience, but you can try: http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.directsetup.directxsetupgetversion%28VS.85%29.aspx
Upvotes: 3