-
Notifications
You must be signed in to change notification settings - Fork 38
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
INTEL gpu black screen when running Shadertone #22
Comments
Thanks for the report, Joseph. Are there any warnings or errors reported? I would expect some sort of errors when creating the GL context. Do you hear sounds? Does the overtone part work? I'm not running Mavericks yet, I'm still on Lion so I can't repro. |
Yes I hear sound, the Overtone part seems to work fine. I cannot see any errors reported, unless they are logging to somewhere I don't know about... I clone and ran "lein alpha" for https://github.com/rogerallen/hello_lwjgl |
Thanks for checking with hello_lwjgl. That gives hope that this can work. I just need more of an idea as to where things might be going wrong. Could you look in the output of "Console" to see if anything went there? I guess I'll have to try adding more error checking. |
www.shadertoy.com works fine in chrome for me with various shaders. Full output of lein run in shadertoy:
|
Thank you, that's helpful. I'll try to write up some tests for this ASAP. If you're not too sick of this, could you try "lein test" and see if that works at all? |
lein test launches the black screens, fullscreen also but just no pulses. No error messages bar the failing tests. Now i've done my live performance I'm a bit freer and can also take a deeper look. |
If you're going to try looking closer, start by littering the src/shadertone/shader.clj routines
with
to see which GL call is causing the trouble. I was hoping to try this out on my wife's older intel GPU, but it won't even load Overtone at all (older OS, older Java, not going to bother further). I'll try adding these error checks to the code. p.s. sorry shadertone wasn't available for your live performance. |
Used this to find an error where (GL20/glGetShaderi new-pgm-id GL20/GL_LINK_STATUS) should have been (GL20/glGetProgrami new-pgm-id GL20/GL_LINK_STATUS). So, I think this should solve issue #22
I think I found the error Joseph. Could you pull the latest & retry? |
Thanks for looking into this! With no errors in the console either. |
Oh, no! No errors? So OpenGL has nothing to complain about, but it just doesn't display anything? This is proving difficult! Please try a "lein clean", "lein test", Joseph. The shaders in "lein test" are much simpler than the one that runs via "lein run". |
Same result with While it relates to an older version of lwjgl there where some reports from Minecraft users of only getting a black screen. Thats all I've found digging through google for similar issues with Maverick. https://timashley.me/node/596 Also info on my OPENGL version:
|
Without some more hints as to what might be going wrong, I'm a bit at a loss for how to move forward. Some ideas:
any other thoughts, Joseph? |
Ill have another play on my flight, no luck so far sprinkling error Starting to run out of ideas myself! Would be good to confirm with another maverick user, when I get back There is a lot of depth in the java gl classes which makes it quite a On Saturday, January 11, 2014, Roger Allen wrote:
Joseph Wilk |
Okay, the fact that you can run hello-lwjgl beta is good as that is basically where shadertone started. I think I'd like to start with something that works and keep adding more shadertone-like code until it breaks. |
in order to find the problem with overtone/shadertone#22
Joseph, can you please pull the latest hello_lwjgl and try "lein run delta". You should see a spinning yellow triangle. The delta test uses beta as a base & changes the minimal things to make it look like shadertone. OpenGL 2.1 is the main change...I'm wondering if perhaps the 2.1 driver is not as well-tested as later drivers? |
Lein run delta gives the black screen with nothing on it! Joe On Saturday, January 11, 2014, Roger Allen wrote:
Joseph Wilk |
Alright, this helps! Try changing line 14 to use OpenGL 3.2
just in case if that doesn't help, try commenting out lines 31,32
|
I tried:
None of those changes had any effect. Despite that setting I was still seeing in the console output:
Would that println always miss the opengl version if we change it as above?
|
if i try and copy the beta.clj versions setup of the context-attributes: context-attributes (-> (ContextAttribs. 3 2)
(.withForwardCompatible true)
(.withProfileCore true)) I got lots of errors.
|
It seems like LWJGL cannot deal with compatibility profile on the mac as https://lwjgl.org/javadoc/org/lwjgl/opengl/ContextAttribs.html says
So, in order to get this working on your Air we would have to make some incompatible OpenGL changes that basically change the delta code back to the beta code. This seems to be a Catch-22, since one of the main features of shadertone is to run www.shadertoy.com WebGL shaders (which require version 120 GLSL which is supported by OpenGL 2.1, not 3.2-core). At least that's how I see it at the moment. I'm not sure which way to move at the moment... It might help if we can figure out if this is an LWJGL or a MacOS issue... |
Resummarizing the situation as I see it... I believe there is either a bug in LWJGL, MacOS Mavericks or the INTEL GL driver since there is no report of glErrors and the code seems to work for other platforms. Following up on this error is going to be some work. Basically, I think we'd need to write a variant of the hello_jwjgl delta program in Objective-C and perhaps Java to narrow it down further. I'm torn between trying to figure out this bug and making a variant of shader.clj that creates a more modern GL context (GL3 or GL4) and figures out how to make shadertoy GLSL work. |
Hey, I only just remembered that I can force the use of my MacBooks Intel HD 4000 via gfxCardStatus. Now I'm able to repro the issue--a black screen and no GL errors. (hello_lwjgl alpha & beta work + delta fails so this matches your report) So, it isn't a new Mavericks issue at least since I'm running Lion + OpenGL version: 2.1 INTEL-8.16.74. Seems like an INTEL driver issue. |
Okay...I think I got it. Joseph, please pull the latest and retry. |
Lots of flashing lights and pretty shapes with Look forward to using shadertone in my next live performance. |
Oh, thank goodness! It turned out to be something very simple, but debugging OpenGL is not straightforward. Closing as fixed. YAY! |
Hi,
I'm using OS X maverick. I cloned the project and ran a repl (Clojure 1.5.1). Also ran lein run
I could not get any of the examples to work.
It launches a main window but it is always black. I think I've been through ever example with the sample result.
Am I doing something wrong?
I also tried the https://github.com/rogerallen/sot project and had the same black window.
Java info:
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
Thanks,
Joseph Wilk
The text was updated successfully, but these errors were encountered: