runtime issue on OS X

Issue #2 resolved
Richard Jones
created an issue

The following console output was produced when I ran the current distribution of lithosphere with the OS X patch from my previous issue.

(default)richard-joness-macbook:lithosphere richard$ python run.py Traceback (most recent call last): File "_ctypes/callbacks.c", line 295, in 'calling callback function' File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/carbon/init.py", line 810, in _on_mouse_up

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/init.py", line 1150, in dispatch_event

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/halogen-0.1.1-py2.6.egg/halogen/button.py", line 35, in on_mouse_release File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/lithosphere/toolbar.py", line 25, in on_click type(self.application) File "/Users/richard/Downloads/lithosphere/lithosphere/noise.py", line 42, in init grad = UniformArray(float, 2, self.grad), File "/Users/richard/Downloads/lithosphere/lithosphere/application.py", line 187, in shader for name in names File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 55, in open File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 48, in init gletools.shader.Exception: file: /Users/richard/Downloads/lithosphere/lithosphere/shaders/simplex.frag, failed to compile: ERROR: 0:37: '&' : reserved for future use
ERROR: 0:39: '&' : reserved for future use

Traceback (most recent call last): File "_ctypes/callbacks.c", line 295, in 'calling callback function' File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/carbon/init.py", line 810, in _on_mouse_up

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/init.py", line 1150, in dispatch_event

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/halogen-0.1.1-py2.6.egg/halogen/button.py", line 35, in on_mouse_release File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/lithosphere/toolbar.py", line 25, in on_click type(self.application) File "/Users/richard/Downloads/lithosphere/lithosphere/noise.py", line 42, in init grad = UniformArray(float, 2, self.grad), File "/Users/richard/Downloads/lithosphere/lithosphere/application.py", line 187, in shader for name in names File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 55, in open File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 48, in init gletools.shader.Exception: file: /Users/richard/Downloads/lithosphere/lithosphere/shaders/simplex.frag, failed to compile: ERROR: 0:37: '&' : reserved for future use
ERROR: 0:39: '&' : reserved for future use

Traceback (most recent call last): File "_ctypes/callbacks.c", line 295, in 'calling callback function' File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/carbon/init.py", line 810, in _on_mouse_up

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/window/init.py", line 1150, in dispatch_event

File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/halogen-0.1.1-py2.6.egg/halogen/button.py", line 35, in on_mouse_release File "/Users/richard/Downloads/lithosphere/pyglet-1.2dev-py2.6.egg/pyglet/event.py", line 355, in dispatch_event File "/Users/richard/Downloads/lithosphere/lithosphere/toolbar.py", line 25, in on_click type(self.application) File "/Users/richard/Downloads/lithosphere/lithosphere/noise.py", line 42, in init grad = UniformArray(float, 2, self.grad), File "/Users/richard/Downloads/lithosphere/lithosphere/application.py", line 187, in shader for name in names File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 55, in open File "/Users/richard/Downloads/lithosphere/gletools-0.1.0-py2.6.egg/gletools/shader.py", line 48, in init gletools.shader.Exception: file: /Users/richard/Downloads/lithosphere/lithosphere/shaders/simplex.frag, failed to compile: ERROR: 0:37: '&' : reserved for future use
ERROR: 0:39: '&' : reserved for future use

Comments (6)

  1. Florian Bösch repo owner

    I've added a check for glsl version 1.30. Unfortunately many apple machines come with a driver that only supports glsl version 1.20, and emulating the bitwise & with the fract function leads to undesirable precision artifacts, while emulating it with modulo doesn't work at all.

    6ab7f646f1f7

  2. Anonymous

    You might also just try to use:

    1. extension GL_EXT_gpu_shader4 : enable

    as the first line in the shader to enable bitwise ops ;)

  3. Florian Bösch repo owner

    I've actually tried that first, and while this works, it makes the shader non 1.20 compatible, and the 1.20 shaders also do not understand the #glsl version tag, and quite a lot of macs do not support anything else then 1.20 at all.

  4. Log in to comment