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;
}

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.