Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat # as line comment #2

Merged
merged 1 commit into from Sep 1, 2018
Merged

Treat # as line comment #2

merged 1 commit into from Sep 1, 2018

Conversation

w0rm
Copy link
Collaborator

@w0rm w0rm commented Aug 31, 2018

Couldn't test this though

@shuhei
Copy link
Owner

shuhei commented Sep 1, 2018

Sorry, I rebased glsl-parser and now my commits in this branch are outdated... Can you rebase it?

@w0rm w0rm force-pushed the glsl-parser-macro branch 2 times, most recently from c6c4460 to 0a02bcb Compare September 1, 2018 08:27
@w0rm
Copy link
Collaborator Author

w0rm commented Sep 1, 2018

@shuhei I added support for #, and it seems to work!

vertexShader : Shader Vertex Uniforms { vcolor : Vec3 }
vertexShader =
    [glsl|
        #extension GL_OES_standard_derivatives : enable
        #ifdef VERTEX
        float a = 0.0;
        #endif
        attribute vec3 position;
        attribute vec3 color;
        uniform mat4 perspective;
        varying vec3 vcolor;

        void main () {
            gl_Position = perspective * vec4(position, 1.0);
            vcolor = color;
        }

    |]

@shuhei shuhei merged commit dcd46cb into glsl-parser Sep 1, 2018
@w0rm w0rm deleted the glsl-parser-macro branch September 1, 2018 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants