Updated code changes to reflect content updates.

This commit is contained in:
Joey de Vries
2017-05-29 21:04:33 +02:00
parent 5846428705
commit 28eb2bbf62
25 changed files with 90 additions and 92 deletions

View File

@@ -1,8 +1,8 @@
#version 330 core
out vec4 fragColor;
out vec4 FragColor;
in vec3 ourColor;
in vec2 texCoord;
in vec2 TexCoord;
uniform float mixValue;
@@ -13,5 +13,5 @@ uniform sampler2D texture2;
void main()
{
// linearly interpolate between both textures
fragColor = mix(texture(texture1, texCoord), texture(texture2, texCoord), mixValue);
FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), mixValue);
}

View File

@@ -4,11 +4,11 @@ layout (location = 1) in vec3 aColor;
layout (location = 2) in vec2 aTexCoord;
out vec3 ourColor;
out vec2 texCoord;
out vec2 TexCoord;
void main()
{
gl_Position = vec4(aPos, 1.0f);
gl_Position = vec4(aPos, 1.0);
ourColor = aColor;
texCoord = vec2(aTexCoord.x, aTexCoord.y);
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
}

View File

@@ -11,8 +11,8 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow *window);
// settings
const unsigned int SCR_WIDTH = 1280;
const unsigned int SCR_HEIGHT = 720;
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
// stores how much we're seeing of either texture
float mixValue = 0.2f;