471,616 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

Querying Graphics Card Name

Hello,
I would like to find out the name of the graphics card of the machine
my program is running on. I have looked into the pyopengl module, and
using them to query the card, but it seems like there ought to be a
simpler way to find this out without setting up a glcontext. Does
anyone have any ideas?

Thanks,
Benjamin

Aug 9 '07 #1
5 1893
Benjamin Goldenberg wrote:
I would like to find out the name of the graphics card of the
machine my program is running on. I have looked into the pyopengl
module, and using them to query the card, but it seems like there
ought to be a simpler way to find this out without setting up a
glcontext. Does anyone have any ideas?
You could execute glxinfo and look for the renderer string. If
that's sharp enough for your purpose. Another option is lspci.

Regards,
Björn

--
BOFH excuse #215:

High nuclear activity in your area.

Aug 9 '07 #2
On Aug 9, 3:26 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n...@spamgourmet.comwrote:
Benjamin Goldenberg wrote:
I would like to find out the name of the graphics card of the
machine my program is running on. I have looked into the pyopengl
module, and using them to query the card, but it seems like there
ought to be a simpler way to find this out without setting up a
glcontext. Does anyone have any ideas?

You could execute glxinfo and look for the renderer string. If
that's sharp enough for your purpose. Another option is lspci.
I should have clarified. I would like a cross platform implementation,
Windows and *nix. It doesn't seem as if glxinfo is available under
Windows, at least not without installing X11 under cygwin. If
necessary, I can write the *nix and Windows queries separately.

Thanks,
Benjamin

Aug 9 '07 #3
Benjamin Goldenberg wrote:
I would like to find out the name of the graphics card of the machine
my program is running on. I have looked into the pyopengl module, and
using them to query the card, but it seems like there ought to be a
simpler way to find this out without setting up a glcontext. Does
anyone have any ideas?
You need a context if you're going to ask OpenGL to tell you what the card
is. To find out any other way would be highly platform-specific, possibly
though looking in the /proc directory on Linux, and who-knows-where-else on
other platforms.

Also, have a look at tools/info.py in the pyglet project
<http://www.pyglet.org/>
Richard

Aug 9 '07 #4
On Aug 9, 4:06 pm, Richard Jones <richardjo...@optushome.com.au>
wrote:
Benjamin Goldenberg wrote:
I would like to find out the name of the graphics card of the machine
my program is running on. I have looked into the pyopengl module, and
using them to query the card, but it seems like there ought to be a
simpler way to find this out without setting up a glcontext. Does
anyone have any ideas?

You need a context if you're going to ask OpenGL to tell you what the card
is. To find out any other way would be highly platform-specific, possibly
though looking in the /proc directory on Linux, and who-knows-where-else on
other platforms.

Also, have a look at tools/info.py in the pyglet project
<http://www.pyglet.org/>

Richard
Thanks for the reference, but I was unable to find tools/info.py in
pyglet. What would be the full path to this file?
Thanks.

Aug 9 '07 #5
On Thu, 09 Aug 2007 21:58:54 -0000, Benjamin Goldenberg <bg*********@gmail.comwrote:
On Aug 9, 3:26 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n...@spamgourmet.comwrote:
>Benjamin Goldenberg wrote:
I would like to find out the name of the graphics card of the
machine my program is running on. I have looked into the pyopengl
module, and using them to query the card, but it seems like there
ought to be a simpler way to find this out without setting up a
glcontext. Does anyone have any ideas?

You could execute glxinfo and look for the renderer string. If
that's sharp enough for your purpose. Another option is lspci.

I should have clarified. I would like a cross platform implementation,
Windows and *nix. It doesn't seem as if glxinfo is available under
Windows, at least not without installing X11 under cygwin. If
necessary, I can write the *nix and Windows queries separately.
Yeah, but ...
- what if there isn't one?
- what if there are several?
- what if there *is* one, but your user is sitting by a remote machine,
not using the card at all?

Your method will, no matter how you choose, fail sooner or later,
so you'd better plan for that.

What is your reason to do this, by the way? Remember what Homer
Simpson said: if something appears to be hard, it is simply not worth
doing. And I mean that semi-seriously.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Aug 12 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by dries | last post: by
8 posts views Thread by Mark Johnson | last post: by
5 posts views Thread by Snuyt | last post: by
5 posts views Thread by =?Utf-8?B?TW9oYW1tYWQtUmV6YQ==?= | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.