Skip to content

Commit

Permalink
Change to depend on GL 3.3 instead of 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jdah committed Feb 21, 2021
1 parent ede927b commit 1c14fc3
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion res/shaders/basic2d.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

uniform sampler2D tex;
uniform bool use_tex;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/basic2d.vs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/basic_color.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

uniform vec4 color;

Expand Down
2 changes: 1 addition & 1 deletion res/shaders/basic_color.vs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

layout (location = 0) in vec3 position;

Expand Down
2 changes: 1 addition & 1 deletion res/shaders/basic_texture.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

uniform sampler2D tex;
uniform vec4 color;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/basic_texture.vs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/chunk.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

uniform sampler2D tex;

Expand Down
14 changes: 7 additions & 7 deletions res/shaders/chunk.vs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
Expand All @@ -9,12 +9,12 @@ uniform mat4 m, v, p;
uniform vec4 sunlight_color;

// should match enum Direction in direction.h
const uint NORTH = 0;
const uint SOUTH = 1;
const uint EAST = 2;
const uint WEST = 3;
const uint UP = 4;
const uint DOWN = 5;
const uint NORTH = 0U;
const uint SOUTH = 1U;
const uint EAST = 2U;
const uint WEST = 3U;
const uint UP = 4U;
const uint DOWN = 5U;

out vec4 v_color;
out vec2 v_uv;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/sky.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

uniform sampler2D tex;
uniform bool use_tex;
Expand Down
2 changes: 1 addition & 1 deletion res/shaders/sky.vs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 410
#version 330

layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
Expand Down
4 changes: 2 additions & 2 deletions src/gfx/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ void window_create(FWindow init, FWindow destroy, FWindow tick, FWindow update,
}

glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

Expand Down

1 comment on commit 1c14fc3

@jdah
Copy link
Owner Author

@jdah jdah commented on 1c14fc3 Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damiantoczek see #27

Please sign in to comment.