dalerank / nanogui-sdl

Minimalistic port of NanoGUI claim works with SDL API w/o external dependencies.
Other
437 stars 77 forks source link

example1 fails with GLSL 3.30 is not supported #15

Closed whattis closed 5 years ago

whattis commented 7 years ago

I compiled the project and then ran ./example1, but it errors out with:

Error while compiling vertex shader "ImageViewShader":
#version 330
        uniform vec2 scaleFactor;
        uniform vec2 position;
        in vec2 vertex;
        out vec2 uv;
        void main() {
            uv = vertex;
            vec2 scaledVertex = (vertex * scaleFactor) + position;
            gl_Position  = vec4(2.0*scaledVertex.x - 1.0,
                                1.0 - 2.0*scaledVertex.y,
                                0.0, 1.0);

        }

Error: 
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

terminate called after throwing an instance of 'std::runtime_error'
  what():  Shader compilation failed!
Aborted
dalerank commented 5 years ago

redesigned for sdl2 api only, try now