Minor refactor of built-in QSGVideoNodes.

- Load shader source from resource files.
- Correctly report material types: each material can use different
  shaders depending on the video pixel format but it was reporting
  a unique material type. This was causing the node to keep using
  the same shader even if its pixel format changed.

Change-Id: Ib903ecd6e7dd1dd56d7cefe255ab7049933df17d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
Yoann Lopes
2015-04-28 18:35:38 +02:00
parent 61033aa420
commit fe13f5bb05
14 changed files with 292 additions and 286 deletions

View File

@@ -0,0 +1,9 @@
uniform highp mat4 qt_Matrix;
attribute highp vec4 qt_VertexPosition;
attribute highp vec2 qt_VertexTexCoord;
varying highp vec2 qt_TexCoord;
void main() {
qt_TexCoord = qt_VertexTexCoord;
gl_Position = qt_Matrix * qt_VertexPosition;
}