nickguletskii / GLXOSD

GLXOSD is an extensible on-screen display (OSD)/overlay for OpenGL applications running on Linux with X11 which aims to provide similar functionality to MSI Afterburner/RivaTuner OSD. It can show FPS, frame timings, temperatures and more in OpenGL games and applications. It can also be used to benchmark games, much like voglperf.
https://glxosd.nickguletskii.com
MIT License
124 stars 20 forks source link

Display the OpenGL version of the underlying application/game #25

Open sabun123 opened 9 years ago

sabun123 commented 9 years ago

Hi, This is a feature request. Would it be possible to add to the overlay information on what version of OpenGL the current game/application is using?

Something akin to MSI Afterburner's ability to detect what version of Direct3D the game/application is using. For MSI Afterburner, it looks something like this:

It doesn't have to look exactly like that, but the ability to automatically determine the OpenGL version and display it would be a great addition.

ghost commented 9 years ago

I doubt this is feasible. OpenGL isn't tied to versions to the same extent that D3D is. An OpenGL application can use whatever functions it wants so long as the hardware supports them. Note there is a difference between core and legacy contexts, but even then you can access the full extent of OpenGL functionality within a legacy context. Also, I don't think there is a way to extract the type of context used at runtime, at least glXQueryContext doesn't provide anything like that.

ghost commented 9 years ago

Maybe you could hook into all OpenGL functions, see what kind of functions the application is calling, check the OpenGL version that these functions were introduced in, and thus determine the minimum OpenGL version required by the application. It would be a lot of work though, and introduce a performance overhead as well.