Skip to content

Instantly share code, notes, and snippets.

@avwhite
Created August 16, 2014 16:17
Show Gist options
  • Save avwhite/25b634ca9a689647e68d to your computer and use it in GitHub Desktop.
Save avwhite/25b634ca9a689647e68d to your computer and use it in GitHub Desktop.
OpenGL problem shader program
#version 330 core
layout(location = 0) in vec3 vertexPosition_modelspace;
uniform mat4 MVP;
void main(){
vec4 v = vec4(vertexPosition_modelspace,1); // Transform an homogeneous 4D vector
gl_Position = MVP * v;
//mat4 M = mat4(
// vec4(1.0, 0.0, 0.0, 0.0),
// vec4(0.0, 1.0, 0.0, 0.0),
// vec4(0.0, 0.0, 1.0, 0.0),
// vec4(0.0, 0.0, 0.0, 1.0)
//);
//gl_Position = M * v;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment