Nvidia still broke :(

This commit is contained in:
Benjamin Kyd
2019-03-04 20:21:40 +00:00
parent 6431e25243
commit f04325e1eb
3 changed files with 4 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
#version 330 #version 330 core
in vec3 Normal; in vec3 Normal;
in vec3 FragPos; in vec3 FragPos;
// in vec4 FragPosLightSpace; in vec4 FragPosLightSpace;
uniform vec3 lightPos; uniform vec3 lightPos;
uniform vec3 viewPos; uniform vec3 viewPos;

View File

@@ -1,4 +1,4 @@
#version 330 #version 330 core
layout (location = 0) in vec3 position; layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal; layout (location = 1) in vec3 normal;

View File

@@ -97,7 +97,6 @@ void Mesh::render(Shader& shader, Camera& camera) {
GLint uniTrans = glGetUniformLocation(shader.getProgram(), "model"); GLint uniTrans = glGetUniformLocation(shader.getProgram(), "model");
glUniformMatrix4fv(uniTrans, 1, GL_FALSE, glm::value_ptr(model)); glUniformMatrix4fv(uniTrans, 1, GL_FALSE, glm::value_ptr(model));
// // View matrice // // View matrice
// glm::mat4 view = glm::lookAt( // glm::mat4 view = glm::lookAt(
// glm::vec3(1.0f, 1.0f, 1.0f), // glm::vec3(1.0f, 1.0f, 1.0f),
@@ -109,7 +108,7 @@ void Mesh::render(Shader& shader, Camera& camera) {
glUniformMatrix4fv(uniView, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix())); glUniformMatrix4fv(uniView, 1, GL_FALSE, glm::value_ptr(camera.getViewMatrix()));
// Projection matrice // Projection matrice
glm::mat4 proj = glm::perspective(glm::radians(45.0f), 1280.0f / 720.0f, 1.0f, 1000.0f);//camera.perspective; glm::mat4 proj = glm::perspective(glm::radians(45.0f), 1280.0f / 720.0f, 1.0f, 1000.0f);
// Get uniform and send it to the GPU // Get uniform and send it to the GPU
GLint uniProj = glGetUniformLocation(shader.getProgram(), "proj"); GLint uniProj = glGetUniformLocation(shader.getProgram(), "proj");
glUniformMatrix4fv(uniProj, 1, GL_FALSE, glm::value_ptr(proj)); glUniformMatrix4fv(uniProj, 1, GL_FALSE, glm::value_ptr(proj));