OpenGL and hw-accel checking

I create surface:

screen=SDL_SetVideoMode(width, height, bpp, SDL_OPENGL);

how can I check if OpenGL is hardware accelerated?
I tried SDL_HWACCEL flag, but it shows FALSE even if I was sure it is ON.–
In the land of no tomorrow
Where you pray just to end each day
And your life just slowly melts away “Egypt (The Chains Are On)”
- Ronnie James Dio

I’m not sure, but as i know, OpenGl is always Hardware accelerated?> ----- Original Message -----

From: jp@ulgo.koti.com.pl (Jacek Poplawski)
To:
Sent: Sunday, July 08, 2001 7:36 PM
Subject: [SDL] OpenGL and hw-accel checking

I create surface:

screen=SDL_SetVideoMode(width, height, bpp, SDL_OPENGL);

how can I check if OpenGL is hardware accelerated?
I tried SDL_HWACCEL flag, but it shows FALSE even if I was sure it is ON.


In the land of no tomorrow
Where you pray just to end each day
And your life just slowly melts away “Egypt (The Chains Are
On)”
- Ronnie James Dio

Nope, there are software implementations for most platforms.

However, OpenGL pretty much has to be h/w accelerated to be usable
for any real time rendering, even on the fastest workstations
available these days. (It doesn’t seem to be possible to use the
real OpenGL API for an optimized software rasterizer…)

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Sunday 08 July 2001 21:39, Dan wrote:

I’m not sure, but as i know, OpenGl is always Hardware accelerated?

no, you can have OpenGL with software engine, and it’s terrible slow,
so it will be nice to know if user has hardware accelerationOn Sun, Jul 08, 2001 at 09:39:55PM +0200, Dan wrote:

I’m not sure, but as i know, OpenGl is always Hardware accelerated?


All eyes see the figure of the wizard
As he climbs to the top of the world
No sound, as he falls instead of rising "Stargazer"
Time standing still, then there’s blood on the sand - Ronnie James Dio

I’m not sure, but as i know, OpenGl is always Hardware accelerated?

No, and especially not under Linux (“Software Mesa” for misconfigured
systems or boxes without 3D hardware).

Your options:

  1. Time the rendering on the fly. If it’s godawful slow, do something.
    Note that your idea of slow may not be someone else’s. Note also that
    there are external issues (cronjobs, etc) that might drop your framerate
    temporarily, and what you choose to use to measure the speed of the
    renderer may be accelerated in one driver and not another.

  2. Check the renderer string with glGetString(GL_RENDERER). Pray that it
    never changes. Note this will only help you detect software Mesa or
    whatever you explicitly look for, but who knows if platform X in the
    future will give you non-accelerated OpenGL with a string you don’t
    expect?

  3. Make it easy for the user to get out of your program if it’s in
    software mode, and let them fix their configuration themselves, and don’t
    burden yourself with it. Ultimately, this is the only option that isn’t a
    losing battle.

I’ve tried all three approaches, and honestly, they all suck. #3 seems to
suck the least, though. Ymmv.

–ryan.