ronag
ronag

Reputation: 51255

Check for all used OpenGL Extensions

I'm using GLEE in my application and everything works just fine on regular Windows.

However, when running under virtualization my application does not work properly. Either it crashes or just renders black. This is probably due to some OpenGL extension missing. I have tried to identify all the used extensions and check for the during program startup so that it warns the user. This have worked out in the case of the crash. However, in the render black case I don't get any extension missing warning. I suspect this is because I have missed checking for some extension. So my question is.

Is there any good way to identify all the OpenGL extensions that are used in an application so that one might add checks for them?

Upvotes: 3

Views: 771

Answers (2)

my fat llama
my fat llama

Reputation: 181

You can also look at GLEW for extensions as well / instead.

It provides macros to query implemented extensions.

http://glew.sourceforge.net/basic.html

Upvotes: 0

Damon
Damon

Reputation: 70126

Possible, but it will be a bit of work.

GLEE offers lazy loading, so you should be able to trivially modify it to log each function that is called. The lazy loading code (I have not looked at it, admittedly, but it is probably something similar) probably looks something like:
if(funcptr == 0) { _ _ glee_load_fp(funcptr, _ _ FUNCTION _ _) } funcptr(args); .

So, what you would have to do first would be to log all functions that you actually call in this manner, and then you would have to do a reverse lookup mapping function names to extensions. Normally that would mean to parse glext.spec, which is a horror. But luckily, you can download an xml representation of everything that's inside GLEE from the GLEE website, which is much, much nicer to work with.

Upvotes: 1

Related Questions