Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Bhaji_On_PC

Getting graphics card specs

This topic is 5210 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!