Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to require only the extensions my system supports? #97

Closed
computersarecool opened this issue Jul 18, 2017 · 2 comments
Closed

How to require only the extensions my system supports? #97

computersarecool opened this issue Jul 18, 2017 · 2 comments
Labels

Comments

@computersarecool
Copy link

Hi,
If I use the Web service and I "add all" of the extensions - when I use the resulting file does the header #define macros for only the extensions available on my system?

In other words, If i try to do #ifdef GL_EXT_memory_object and I requested that extension but it is not available on my platform, will it be defined (incorrectly)?

@Dav1dde
Copy link
Owner

Dav1dde commented Jul 19, 2017

The defines just allow you to check at compile time which extensions (and opengl versions) are potentially available. After loading/initilaizing glad you can check with GLAD_<name of extension> if the extension is available at runtime (= supported by the driver and loaded).

In your example:

// [initialize glad]
// ...

if (!GLAD_GL_EXT_memory_object) {
    die("GL_EXT_memory_object not supported!");
}

I hope this answers your question.

@Dav1dde Dav1dde closed this as completed Jul 19, 2017
@computersarecool
Copy link
Author

It does. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants