-
Notifications
You must be signed in to change notification settings - Fork 24
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
weird gl.CompileShader() gl.GetShaderInfoLog issue on OS X 10.6 (not on 10.7/10.8/linux) #49
Comments
I forgot to mention that i am using package "github.com/errcw/glow/gl/2.1/gl" |
Can that same system run the GL 3.1 Cube Example ? Are you properly utilizing Why are you zero-terminating the string yourself and using How is If you can share a complete, minimalistic, example of the problem it would help us to debug it. Aside from my above comments, I don't see anything obviously wrong with the above code. |
slimsag: Yes I have runtime.LockOSThread() in init(). I do my own slice conversion to avoid a copy. I don't think this is causing a problem because i have printed the contents of the converted source, and it is what it should be: a valid GLSL shader. See here my GSL_ShaderLog function: func GLSL_ShaderLog(shader uint32) string { Ok, my current test program is still fairly minimalistic, just setting up GLFW and OpenGL, building the shader and doing a simplistic rendering. It's currently only two files but i can easily turn it into one file. Where and how would you like to receive it? I can post it here if that is convenient. Thanks for looking into this, i am puzzled and slightly depressed by this unusual failure. All my other Go programming has always been so supersmooth till now! |
Note that i have spent some time testing with pre-2.1 versions of shader functionality as well, ARB extensions based, to rule out the possibility that that machine somehow doesn't support the 'built-in' GLSL funtionality. Sadly the same here: it works in my C++ code, but not in my equivalent Go code :( |
Which version of Go are you running? |
1.3 On 28 November 2014 at 02:01, Dmitri Shuralyov [email protected]
|
Do you mean 1.3.0? It may be a long shot, but can you try 1.3.3, which is the latest stable Go version, or perhaps even 1.4rc1? |
Yes, i am using the plain 1.3 release here. I am using errcw/glow though, not go-gl/glow with the latest updates. I might try that tomorrow. |
I see. I apologize as I'm not 100% familiar with OS X yet.
FWIW
Even multiple files, if you could put it anywhere it would be useful to get a complete picture of the program (instead of just a segment of it). A zip file uploaded to e.g. Google Drive, or even putting it into one of your own Git repo's would work great. Another idea: Does |
slimsag: https://drive.google.com/file/d/0BxruJsiZGIgaenhvRlh1VTBWQ0k/view?usp=sharing All the people here, feel free to have a look at it. I am at a loss, can't understand why this code works on the majority of my machines and not on the one running OS X 10.6.8. gl.GetError remains silent... |
On that problematic machine i had a dual install of glfw2 and glfw3. To make sure the issue isn't caused by that i removed all glfw libraries from the system and reinstalled glfw3 from scratch (both the C library and the Go package). Sadly this didn't solve the shader compile problem... |
A couple thoughts:
|
See here the relevant output on the problematic machine. The OpenGL version GL version : 2.1 NVIDIA-1.6.40 ---------------- ^ ! the info log is always empty, unlike on other machines The shader that fails is extremely trivial: void main() No matter what nonsense i add to this shader, the info log never has a On 28 November 2014 at 19:11, Eric Woroshow [email protected]
|
Pfew, i found and fixed a bug in my code. My issue didn't have anything to do with glow/gl or glfw3 or OS X in particular. The length i gave in gl.CreateShader() was 1 too large (it included the zero terminator). Apparently most OpenGL drivers are robust enough to handle such an error, but not all... |
Glad to hear you got to the bottom of it, and it turned out not to be a bug in glfw3 or glow (if it had been, we would've fixed it). |
I am experiencing a weird problem where my code works fine on 3 of my test machines (OS X 10.7, 10.8 and linux) but not on a machine with OS X 10.6. The problematic machine can't compile any GLSL shader, it seems to always return gl.FALSE when asking for gl.COMPILE_STATUS. What is especially odd is that the info log is always empty, even if i introduce obvious errors in the source. Normally there will be useful messages in the info log when a compilation fails. The problematic machine is able to compile and link and run the very same shader just fine from my (original) C++ application. If I 'mess up' the shader source there, I do get sensible info log data back, so in principle, that machine can do what i want it to do...
The only other external package that my application depends on is glfw3.
What could be going on here? Could it be a glow/gl issue?
What is bothering me most is that the C++ code is doing the very same thing as the Go equivalent, and that the very same code works on 3/4 of my test machines...
This is the function I use to compile a shader:
Who can shed a light on this?
The text was updated successfully, but these errors were encountered: