Getting graphics card specs
How can I get the specs of the graphics card on my machine programatically. I am using Visual Basic.
I want to get a hold of the Anti-aliasing and anisotroic filtering in particular.
Any help/ suggestions would really help.
Thanks very much.
Using DirectX, you can ask for the hardware capabilities by using Direct3D.GetDeviceCaps() method (not sure about the name, but at least something similar). Listed in the returned structure are the caps you mention, and a lot more.
Using raw VB without DX, I don''t think it is possible.
-Nik
Using raw VB without DX, I don''t think it is possible.
-Nik
look into
glGet*
do you want this code to be portable? or just messing around on your PC, and are wondering if your card supports some stuff.
glGet*
do you want this code to be portable? or just messing around on your PC, and are wondering if your card supports some stuff.
quote:Original post by Bhaji_On_PC
Can I use OpenGL?
Yes, if you know how to import OpenGL functions to VB. It is not very difficult if you know what you''re doing.
quote:
Is there any code available for DirectX
I just gave you all the relevant code
-Nik
Thanks guys.
"GetDeviceCap" doesn''t give me info about the graphics card options such as antialiasing/anisotropic settings.
Is there some special OpenGL command/function I can use.
"GetDeviceCap" doesn''t give me info about the graphics card options such as antialiasing/anisotropic settings.
Is there some special OpenGL command/function I can use.
Antialiasing (of the multisampling variety) and anisotropic filtering are both enabled through extensions. If you have the extension then your graphics card has the capability, but you have to enable it yourself if you want to use it, assuming you didn't already override it in your driver settings. See the extension specs for details.
To get the list of extensions, use glGetString(GL_EXTENSIONS)
The extensions names you should check for are GL_EXT_texture_filter_anisotropic and GL_ARB_multisample.
You can find out more specific details, like the maximum ansitropy level and the max number of samples for multisample using glGet. See the specific extension specs for the pNames to pass to glGet. There's a link to the extension registry, which contains all the specs in the Forum FAQ.
[edited by - benjamin bunny on May 7, 2004 9:00:22 PM]
To get the list of extensions, use glGetString(GL_EXTENSIONS)
The extensions names you should check for are GL_EXT_texture_filter_anisotropic and GL_ARB_multisample.
You can find out more specific details, like the maximum ansitropy level and the max number of samples for multisample using glGet. See the specific extension specs for the pNames to pass to glGet. There's a link to the extension registry, which contains all the specs in the Forum FAQ.
[edited by - benjamin bunny on May 7, 2004 9:00:22 PM]
quote:Original post by Bhaji_On_PC
"GetDeviceCap" doesn''t give me info about the graphics card options such as antialiasing/anisotropic settings.
Did you actually even look at the DirectX documentation?
Assuming "d3d" is already initialized Direct3D8 object, and VB6:
Dim Caps As D3DCAPS8d3d.GetDeviceCaps(0, D3DDEVTYPE_HAL, Caps)''now, the maximum anisotropy of the primary device is in Caps.MaxAnisotropy.
The multi-sampling capabilities can be obtained by using CheckDeviceMultiSampleType() function exposed by the D3D object.
-Nik
Nik02, I think he wants to use only OpenGL.
[huge evil grin] Ben, I think this calls for a VB version of GLee [/huge evil grin]
Bhaji, follow Ben''s advice - it''s what you need to check capabilities on OpenGL. If you''re having problems, just post again.
[huge evil grin] Ben, I think this calls for a VB version of GLee [/huge evil grin]
Bhaji, follow Ben''s advice - it''s what you need to check capabilities on OpenGL. If you''re having problems, just post again.
quote:Original post by FReY
Nik02, I think he wants to use only OpenGL.
That was not the point in my previous post.
quote:
"GetDeviceCap" doesn''t give me info about the graphics card options such as antialiasing/anisotropic settings.
This demonstrates a complete lack of research about the subject - GetDeviceCaps is a real D3D function that indeed returns the said capabilities.
@ OP: Please do use OpenGL if it feels more suitable for you.
Kind rgds,
-Nik
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement