Issue #369 resolved

Add highlighting for OpenGL shaders

Anonymous created an issue

I'd really appreciate highlighting support for OpenGL shader language.

Thanks!

Reported by guest

Comments (7)

  1. Anonymous

    Example shaders from http://gpwiki.org/index.php/OpenGL:Codes:Simple_GLSL_example :

    /* Fragment shader */
    void main()
    {
        gl_FragColor[0] = gl_FragCoord[0] / 400.0;
        gl_FragColor[1] = gl_FragCoord[1] / 400.0;
        gl_FragColor[2] = 1.0;
    }
    
    /* Vertex shader */
    uniform float waveTime;
    uniform float waveWidth;
    uniform float waveHeight;
     
    void main(void)
    {
        vec4 v = vec4(gl_Vertex);
    
        v.z = sin(waveWidth * v.x + waveTime) * cos(waveWidth * v.y + waveTime) * waveHeight;
    
        gl_Position = gl_ModelViewProjectionMatrix * v;
    }
    
    

    These obviously don't make use of all of GLSL's syntax or keywords.

  2. Log in to comment