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

GL_SHADING_LANGUAGE_VERSION glGetString #63

Closed
joe9 opened this issue Sep 12, 2016 · 2 comments
Closed

GL_SHADING_LANGUAGE_VERSION glGetString #63

joe9 opened this issue Sep 12, 2016 · 2 comments

Comments

@joe9
Copy link

joe9 commented Sep 12, 2016

Hello,

Just want to check on how to do this when using GLFW-b? I could find getVersion and getVersionString. But, nothing for getting the Shading Language version.

printf("Supported GLSL is %s\n", (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION));

Thanks

@cloudhead
Copy link
Collaborator

cloudhead commented Sep 12, 2016

GLFW doesn't expose these functions, but you can always go directly to GL:

import           Graphics.GL
import           Foreign.C.String
import           Foreign.Ptr
...
cs <- castPtr <$> glGetString GL_SHADING_LANGUAGE_VERSION
putStrLn =<< peekCString cs

@joe9
Copy link
Author

joe9 commented Sep 16, 2016

Thanks.

@joe9 joe9 closed this as completed Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants