Archived

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

Detecting 3D Card: OpenGL

This topic is 5819 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 do i, using opengl, detect that there is a 3D accelerator hardware present? or does this have to be performed on a per-function basis, asking if a given function is 3D accelerated or not... In short, how do i ask OpenGL if there is a 3d acce. card in the system, and if opengl is using it? thanx for any help,

[Hugo Ferreira][Positronic Dreams][]
"Research is what I''m doing when I don''t know what I''m doing."
- Wernher Von Braun (1912-1977)

Share this post


Link to post
Share on other sites
I don''t think you can, as all (well atleast most) machines have a software implementation. You''re pretty safe to assume that the person running your program is going to atleast have OpenGL1.1 installed (on windows). If they don''t have a hardware accelerator then it''s time they tossed away the 486! Just query for any extensions you may want to use and retrieve pointers to the functions(including the damned ARB_multitexture extension... M$ OGL SUCKS!!!).

Share this post


Link to post
Share on other sites
under Windows you want to specify "PFD_GENERIC_ACCELERATED" when setting the PixelFormat.

also you can query the renderer "glGetString(GL_RENDERER)" and the vendor "glGetString(GL_VENDOR)".

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
Also, after you call ChoosePixelFormat you can can DescribePixelFormat() and check to see if the PFD_GENERIC_ACCELERATED flag is set. If it is, then you have an accelerated mode.

From MSDN:
            
PFD_GENERIC_ACCELERATED

The pixel format is supported by a device driver that
accelerates the generic implementation. If this flag is clear
and the PFD_GENERIC_FORMAT flag is set, the pixel format is
supported by the generic implementation only.



PFD_GENERIC_FORMAT
The pixel format is supported by the GDI
software implementation, which is also known as the generic
implementation. If this bit is clear, the pixel format is
supported by a device driver or hardware.



-Brannon

Edited by - Brannon on January 8, 2002 9:20:29 PM

Share this post


Link to post
Share on other sites