geometry_gl2.vert Example File | Qt 3D 5.6

Qt 5.6 | Qt 3D | Qt 3D: Deferred Renderer C++ Example | geometry_gl2.vert Example File

Qt 5.6.2 Reference Documentation

# geometry_gl2.vert Example File

deferred-renderer-cpp/geometry_gl2.vert

      #version 110

      attribute vec4 vertexPosition;
      attribute vec3 vertexNormal;

      varying vec4 color0;
      varying vec3 position0;
      varying vec3 normal0;

      uniform mat4 mvp;
      uniform mat4 modelView;
      uniform mat3 modelViewNormal;
      uniform vec4 meshColor;

      void main()
      {
          color0 = meshColor;
          position0 = vec3(modelView * vertexPosition);
          normal0 = normalize(modelViewNormal * vertexNormal);
          gl_Position = mvp * vertexPosition;
      }