Commit 426f6aa6 authored by Sean Harmer's avatar Sean Harmer Committed by The Qt Project
Browse files

Refactor shaders into seprate GLSL source files


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>
parent 34c85bb5
Showing with 398 additions and 351 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment