-
Notifications
You must be signed in to change notification settings - Fork 41
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
Failed to compile vertex shader #29
Comments
Damn, I knew this kind of thing would happen at some point. There seem to be frustrating subtle incompatibilities between OpenGL versions, and especially between OpenGL and OpenGL ES. This makes writing a library that uses OpenGL quite hard, since the library can't control the version of OpenGL that is used. Additionally, every implementation of OpenGL differs slightly, so one can never be quite sure if an application will run the same everywhere. What you could try as a temporary fix is to copy the goglbackend package to your project and use that instead, and in the shaders.go file change the shader sources to the following:
Hope that helps. For a better solution later on I think I will make the GL version configurable somehow. |
That does get further. With your changes above, I now get:
I'd debug this myself and try to contribute a solution, but I know virtually nothing about OpenGL (hence my hope to use your library). Thanks for any further help you can provide. |
That is progress. Try the following shaders:
|
Yay! That gets me past the shader compilation. Thank you! Still nothing showing up in the window, but I'm sure I just need to poke that my code a bit to wire things up properly. |
Adding a call to |
Interesting. I've never seen that a glFlush call is actually necessary, but I guess it can be. Sure, a PR would be nice! |
any update on this problem? I have this problem too, Im using it for image generate on workers |
Trying to use this on the latest macOS release (Big Sur) and when running, I get the following error message:
I'm using an OpenGLView directly, rather than some other framework, like glfw or sdl. Is there some special setup I need to do in order to get things to work that those libraries are doing (I'm assuming they work, but I haven't yet tried them to verify)?
For reference, here are some code snippets showing the setup being done for the view:
When creating the view:
The override for prepareOpenGL:
The text was updated successfully, but these errors were encountered: