We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Detect Graphic Card
Page Index Toggle Pages: 1
Detect Graphic Card (Read 474 times)
Detect Graphic Card
Nov 22nd, 2007, 9:42am
 
Hi,

I'm creating a standalone application which is somewhat demanding on the graphic card.

My roommate told me that GeForce cards are optimized for OPENGL and that ATI cards for P3D.

I was wondering if there was a way to detect the brand of the graphic card so that I could set the render mode to either OPENGL or P3D according to the card found.

Any ideas? Maybe with getLocalGraphicsEnvironment()?

Thanks
Re: Detect Graphic Card
Reply #1 - Nov 22nd, 2007, 11:08am
 
I think your roommate might have meant D3D not P3D they're entirely different.

As far as processing is concerned OPENGL is the option for graphically demanding apps, no matter the video card make.

If you're still interested in finding out you can via OpenGL:

Code:
import javax.media.opengl.*;
//...

//in draw
GL gl=((PGraphicsOpenGL)g).beginGL();
String maker=gl.glGetString(GL.GL_VENDOR);
((PGraphicsOpenGL)g).endGL();
println(maker);
Re: Detect Graphic Card
Reply #2 - Nov 22nd, 2007, 3:54pm
 
er, doesn't display properties tell you this (am assuming windows as that's what i'm forced to use). rightclick on desktop, properties, settings, advanced, adapter.

cat /proc/something! on linux
Re: Detect Graphic Card
Reply #3 - Nov 22nd, 2007, 4:26pm
 
I think he was meaning more of a way for a program to tell when run on anyone's computer, not to find what was in his own personal computer.
Re: Detect Graphic Card
Reply #4 - Nov 22nd, 2007, 4:31pm
 
Hi John,

thanks for the reply.

At first, I was 100% positive that OPENGL was the fastest renderer. The thing is I'm working on my Facebook via Processing application. (for a video of it see post in Exhibition section or youtube=> http://youtube.com/watch?v=ZL62fF6Uzjo).

I used OPENGL when developing my application thinking it was the best way to go but when I had many instances of my class on the screen, I noticed huge lag.

I then changed the renderer to P3D and I could actually load
triple the amount of instances and still have way less lag.

Do you know why this is happening?
I have an ATI graphic card so of course I believed my roommate when he told me that! Smiley


Page Index Toggle Pages: 1