Skip to content
  • Sean Harmer's avatar
    Refactor shaders into seprate GLSL source files · 426f6aa6
    Sean Harmer authored
    
    
    The default implementation of QSGShaderMaterial::vertexShader() and
    fragmentShader() now loads the GLSL source from a list of source files
    that can be specified via the setShaderSourceFile() or
    setShaderSourceFiles() functions.
    
    Multiple shader source files for each shader stage are supported. Each
    source file will be read in the order specified and concatenated
    together before being compiled.
    
    The other places where Qt Quick 2 loads shader source code have
    been adapted to use the new QSGShaderSourceBuilder, which is also
    used internally by QSGMaterial.
    
    This puts Qt Quick 2 into a better state ready to support OpenGL
    core profile and to load different shaders based upon OpenGL version,
    profile, GPU vendor, platform, etc.
    
    Change-Id: I1a66213c2ce788413168eb48c7bc5317e61988a2
    Reviewed-by: default avatarGunnar Sletta <gunnar.sletta@digia.com>
    426f6aa6