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

03demo_translate causes crash #28

Closed
hlolli opened this issue May 22, 2015 · 7 comments
Closed

03demo_translate causes crash #28

hlolli opened this issue May 22, 2015 · 7 comments
Labels

Comments

@hlolli
Copy link
Member

hlolli commented May 22, 2015

Hi Roger (and other developers)

I've been using shadertone for a while. Now I updated my Linux to use proprietary driver (AMD Catalyst) and it's working wonderfully on my Fedora 21 GNOME, believe it or not (better perfomance etc.) But now I bump into a new problem, when swapping values in shaders, I always bump into the same error. I believe maybe since my new OpenGL version is now 4.4 then it could be that GL20 libraries dont work as they should?

Anyhow when using swap! in demo03 I get this error message (and in many other sceneros as well)
But I know this error would not have been reproduce-able before I installed the Catalyst Driver.

Loading shader from string
Reloading shader: nil
Exception in thread "Thread-6" org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
    at org.lwjgl.opengl.Util.checkGLError(Util.java:59)
    at org.lwjgl.opengl.GL20.glUniform3f(GL20.java:356)
    at shadertone.shader$draw.invoke(shader.clj:599)
    at shadertone.shader$update.invoke(shader.clj:697)
    at shadertone.shader$run_thread.invoke(shader.clj:728)
    at shadertone.shader$start_shader_display$fn__3628.invoke(shader.clj:935)
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:745)
@rogerallen
Copy link
Member

@hlolli could you try out "lein test" in the main shadertone directory? Some dialogs will pop up and you will want to watch stdout to answer the questions. It would be good to see if an existing test reproduces the error.

Also, please provide the details of how you create the error above, from a fresh start of the REPL with "lein repl". I esp. want to know which swap! causes the error.

@rogerallen rogerallen added the bug label May 23, 2015
@rogerallen
Copy link
Member

FWIW, we'll need to debug which of the reasons listed in the Errors section are causing the Invalid Operation.

https://www.opengl.org/sdk/docs/man/html/glUniform.xhtml

@rogerallen
Copy link
Member

Oh, never mind the repro steps above--I'm able to repro myself on my MacBook Pro. 😄

@rogerallen
Copy link
Member

I've found the issue & should have a bugfix update soon.

rogerallen added a commit that referenced this issue May 24, 2015
Not sure how 03demo_translate ever worked.  This is just broken now.
Apparently drivers have gotten better at checking for errors?
rogerallen added a commit that referenced this issue May 24, 2015
I don't know how reloading a shader ever worked.  Reloading a shader would bind the
new shader in the draw routine, changing the uniform bindings & other
state.  But, the draw routine would continue and use the
previously-bound shader's state for just that first frame.  That glitch
wasn't caught by the drivers until recently, apparently?

New code changes the shader binding prior to calling the draw routine,
so all state is consistent.
@hlolli
Copy link
Member Author

hlolli commented May 24, 2015

Ok good! Thanks alot. (just saw your reply now)

I think I will use the swapping alot in performances, had to stick with single shader in my last performance.

@rogerallen
Copy link
Member

Okay, this should be fixed. Actually, I don't know how it worked before! I know it did, but I'm not sure what happened. In any event, I've beefed up my test suite to check this.

Thanks for the bug report.

Closing.

@rogerallen
Copy link
Member

p.s. send videos of any performances to the Overtone email list so we can all enjoy them! 😄

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