CMake build added. Basic OpenGL 3.3 Mesh Rendering

This commit is contained in:
2023-03-01 07:22:50 +01:00
parent 1215e7d8a5
commit 76c7e1808c
46 changed files with 960 additions and 912 deletions

21
data/shader/MeshV.shader Normal file
View File

@@ -0,0 +1,21 @@
#version 330 core
#extension GL_ARB_explicit_attrib_location : enable
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aNormal;
layout(location = 2) in vec2 aTexCoords;
out vec3 Normal;
out vec2 TexCoords;
out vec3 FragPosition;
uniform mat4 View;
uniform mat4 Model;
uniform mat4 Projection;
void main() {
TexCoords = aTexCoords;
FragPosition = vec3(Model * vec4(aPos, 1.0));
Normal = transpose(inverse(mat3(Model))) * aNormal;
gl_Position = Projection * View * vec4(FragPosition, 1.0);
}