5
$\begingroup$

I've recently rebuild shaders for my program and it stopped "working" ( black screen ) on OS X ( El Capitan ), but it's ok on Linux on GTX 660.

I've tested it on another Apple hardware and it worked on OS X on R9 395 ( but super slow, because of double ). So I suppose it's problem with my Intel HD Graphics 5000.

There are no shader compilation errors, and here is my shader code:

https://github.com/Marqin/YuriaViewer/blob/4241e384da0f27d26cbf5557518db905a9d40039/vertex.glsl

Keep in mind that this software worked on El Capitan with OpenGL 4.1 before shader rewrite. Here are my glfw hints:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

My program also is checking for GL_ARB_gpu_shader_fp64 and it's available on my Macbook ( Macbook Air 2013 mid ).

I've "debugged" it a little and it looks that i is always lesser than vis on OS X, that's why it's black.

I've also made a simple test - I've typed all uniform values in shader by hand and now it wasn't black, but I've got some gibberish on screen. Then I've changed every dvec3 and dvec2 to float versions and it showed nice fractal. So it looks like double is not working on OS X. But how can it be? It's saying that GL_ARB_gpu_shader_fp64 is available and it even doesn't complain when I request it in vertex shader.

How can I make it work on OS X Macbook?

$\endgroup$
9
  • 1
    $\begingroup$ It's unfortunately not uncommon for drivers to contain bugs (or "features" to let Game X play optimally even though it doesn't use the API correctly) $\endgroup$ Jan 11, 2016 at 12:01
  • $\begingroup$ I hope it's not driver bug, but my bug with padding in that struct. $\endgroup$
    – Marqin
    Jan 11, 2016 at 13:46
  • $\begingroup$ and if you use std430 layout? $\endgroup$ Jan 11, 2016 at 13:50
  • $\begingroup$ @ratchetfreak OS X only support OpenGL 4.1 ( also, ARB_gpu_shader_fp64 is not supported on some 4.1 Mac Radeons, but it should be on my Intel ), and std430 was introduced in OpenGL 4.3 $\endgroup$
    – Marqin
    Jan 11, 2016 at 13:59
  • $\begingroup$ I've tested it now on one iMac, and it's working there ( but super slow ). $\endgroup$
    – Marqin
    Jan 11, 2016 at 14:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.