metsci / glimpse

Dynamic and Interactive Visualization of Big Data In Java and OpenGL
http://glimpse.metsci.com
Other
17 stars 6 forks source link

GLSL isnan() function not supported on OSX #3

Closed orenbum closed 9 years ago

orenbum commented 12 years ago

OSX only supports up to GLSL v1.20 (see: https://developer.apple.com/graphicsimaging/opengl/capabilities/) which doesn't include the isnan() function. Trying to run the TaggedHeatMapExample results in the following error:

INFO: Compiling 'PIPELINE colormap'... Mar 15, 2012 7:12:24 PM com.metsci.glimpse.gl.shader.GLShaderUtils logGLShaderInfoLog WARNING: COMPILATION FAILED: 'FRAGMENT SHADER tagged_colorscale_shader' did not compile. Mar 15, 2012 7:12:24 PM com.metsci.glimpse.gl.shader.GLShaderUtils logGLShaderInfoLog WARNING: ERROR: 0:33: Call to undeclared function 'isnan'

I think the only shader this affects is the tagged_colorscale_shader.fs, which uses isnan() to discard values.

ulmangt commented 9 years ago

The call to isnan has been replaced with "x != x" which appears to have the same affect.