-
Notifications
You must be signed in to change notification settings - Fork 774
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
rendering not working on my Ubuntu 13.10/Linux system #3
Comments
Hi, I have not test the shader on many computers yet, so some compatibility issues can be there. Based on the images, looks like the sdroundrect() does not behave correctly on your set. Can you try to add: --mikko |
Doesn't help. It looks the same as the original image. |
FWIW, I think that when I ran on the Mac, it was also an NVIDIA GPU (650M) |
My Mac has Intel HD4000, and I always thought they were the lowest common nominator :) What if you truncate the shader main() just to: "void main(void) {\n" If that works, you won't get clipping nor gradients, but it should confirm that the sdroundrect() is the culprit. |
I ran that (after deleting the stray line 1.0);\n"), but it's still the same thing as the original image. |
Blending should not affect the shader. Does this shadertoy work for you? |
ok, so oddly enough the same code works in one place but in another :( Let's see if the inputs are ok. How does this shader look like: "void main(void) {\n" |
I tried that out, and was curious, so I also tried out alpha.y, and then strokeMult. strokeMult was zero, even though the corresponding call to glUniform1f was passing in a value of something like 1.0. What I found is that none of the uniform variables are getting bound since every single call to glGetUniformLocation fails (returns -1, which is not reported by glGetError, so I added additional error checks). I should be to fix the issue of uniform variables not getting bound, will get back to you soon. |
glGetUniformLocation wasn't the problem -- glUniform1f was simply not working. Apparently this issue is common when glUniform1f isn't dynamically loaded at run-time [1]. A workaround is to use GLEW, which loads the function at run-time. I've added that to my clone of your repository, and will issue a pull request in case you want to merge this workaround. Thanks for all your help. I'm looking forward to really getting started using nanovg. [1] http://encelo.netsons.org/2008/03/17/gluniform1f-is-working/ |
Thank you for taking the time to look into this! That would have been quite tricky to debug remotely :) |
While I have compiled and ran nanovg successfully on my mac, I was recently trying to run the example code on my Ubuntu 13.10 laptop, which uses either an Intel or NVIDIA GPU (proprietary, binary driver) that I can select in the BIOS.
Running with either GPU, the example code doesn't render correctly, and only text appears,
Not being familiar with the underlying rendering technique, there wasn't much I could do to fix it, but I tried to narrow down the issue slightly, by modifying the shader alpha component calculation from "color.w *= strokeAlpha * scissor;", to just "color.w *= scissor;", in which case the rest of the scene appears, but the blending appears off:
The text was updated successfully, but these errors were encountered: