cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
538 stars 59 forks source link

gpu-particles example fails on OS X #273

Closed mjendruk closed 9 years ago

mjendruk commented 9 years ago

The example fails to compile the provided shaders. I couldn't find out why. The output is the following:

Usage:
    ESC     Close example
    ALT + Enter Toggle fullscreen
    F11     Toggle fullscreen
    F10     Toggle vertical sync
    Left Mouse  Rotate scene
    Mouse Wheel Zoom scene
    -       Reduce steps per frame
    =       Increase steps per frame
    R       Compute new forces
    Shift + R   Compute new forces and reset particles
    P       Toggle pause
    F       Particle computation using fragment shader
    T       Particle computation using transform feedback
    C       Particle computation using compute shader
#warning: Version mismatch for the current context: 3.2 requested, 4.1 created.
Using global OS X shader replacement '#version 130' -> '#version 150'

Using global OS X shader replacement '#version 140' -> '#version 150'

#warning: Compute shader based implementation not supported.
#critical: Compiler error:
Shader(GL_VERTEX_SHADER)
ERROR: 0:7: Invalid use of layout 'location'
ERROR: 0:8: Invalid use of layout 'location'
ERROR: 0:17: Use of undeclared identifier 'in_position'
ERROR: 0:17: Use of undeclared identifier 'in_velocity'

OpenGL Version:  4.1
OpenGL Vendor:   Intel Inc.
OpenGL Renderer: Intel Iris OpenGL Engine

#critical: Compiler error:
Shader(GL_FRAGMENT_SHADER)
ERROR: 0:9: Invalid use of layout 'location'
ERROR: 0:10: Invalid use of layout 'location'
ERROR: 0:23: Use of undeclared identifier 'fragColor'
ERROR: 0:24: Use of undeclared identifier 'fragVelocity'

#critical: Compiler error:
Shader(GL_FRAGMENT_SHADER)
ERROR: 0:5: Invalid use of layout 'location'
ERROR: 0:10: Use of undeclared identifier 'fragColor'

#critical: Compiler error:
Shader(GL_VERTEX_SHADER)
ERROR: 0:9: Invalid use of layout 'location'
scheibel commented 9 years ago

Can't reproduce, the output on this OS X is

localhost:globjects me$ ./build/gpu-particles 
Usage:
    ESC     Close example
    ALT + Enter Toggle fullscreen
    F11     Toggle fullscreen
    F10     Toggle vertical sync
    Left Mouse  Rotate scene
    Mouse Wheel Zoom scene
    -       Reduce steps per frame
    =       Increase steps per frame
    R       Compute new forces
    Shift + R   Compute new forces and reset particles
    P       Toggle pause
    F       Particle computation using fragment shader
    T       Particle computation using transform feedback
    C       Particle computation using compute shader
#warning: Version mismatch for the current context: 3.2 requested, 4.1 created.
Using global OS X shader replacement '#version 140' -> '#version 150'

#warning: Compute shader based implementation not supported.

OpenGL Version:  4.1
OpenGL Vendor:   Intel Inc.
OpenGL Renderer: Intel Iris OpenGL Engine
mjendruk commented 9 years ago

Works for me too now. However, when I press C and resize the window, it crashes.