Comments (12)
Hi, currently the project is building fine under linux, but its not running because some BSD code and other "small issues" i already tried to dig into it and see if i can fix it if yes ill send a PR.
The qsort_r issue is already solved, now im getting segfauls from the camera init code...
Edit: spelling
from minecraft-weekend.
Also see #6
from minecraft-weekend.
I have a version which segfaults under Ubuntu on camera creation but does not fail to create a window. Can you provide any extra info about your graphics setup? I imagine that could be causing the issue if GLFW doesn't like your system.
from minecraft-weekend.
I have Lenovo ThinkPad t410 with these parameters:
- Graphic card: Intel HD Graphics,
- Processor: Intel Core i5 520M 2.4 GHz,
- Ram: 4GB.
from minecraft-weekend.
Wow thats a really old cpu, regarding intel ive ran the new build and fixed code on a Core i7 4770 succesfully, so the driver code is not the issue, i bet also on GFLW requiring something that older cpu integrated graphics doesnt have.
from minecraft-weekend.
can reproduce error creating window under WSL. Works fine on a physical linux machine.
from minecraft-weekend.
Arch Linux, same
from minecraft-weekend.
GLFW Error: GLX: Failed to create context: GLXBadFBConfig
error creating window
The reason for the error is in the required OpenGL version, you need support for 4.1 core profile
from minecraft-weekend.
Here is a patch to downgrade the required OpenGL version to 3.3 core profile
diff --git a/res/shaders/basic2d.fs b/res/shaders/basic2d.fs
index 2d30ccf..be71b72 100644
--- a/res/shaders/basic2d.fs
+++ b/res/shaders/basic2d.fs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
uniform sampler2D tex;
uniform bool use_tex;
diff --git a/res/shaders/basic2d.vs b/res/shaders/basic2d.vs
index f870819..c320dcc 100644
--- a/res/shaders/basic2d.vs
+++ b/res/shaders/basic2d.vs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
diff --git a/res/shaders/basic_color.fs b/res/shaders/basic_color.fs
index 2505b37..32ed7bb 100644
--- a/res/shaders/basic_color.fs
+++ b/res/shaders/basic_color.fs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
uniform vec4 color;
diff --git a/res/shaders/basic_color.vs b/res/shaders/basic_color.vs
index ef9359e..718a206 100644
--- a/res/shaders/basic_color.vs
+++ b/res/shaders/basic_color.vs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
layout (location = 0) in vec3 position;
diff --git a/res/shaders/basic_texture.fs b/res/shaders/basic_texture.fs
index e9e5b1b..f79c60e 100644
--- a/res/shaders/basic_texture.fs
+++ b/res/shaders/basic_texture.fs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
uniform sampler2D tex;
uniform vec4 color;
diff --git a/res/shaders/basic_texture.vs b/res/shaders/basic_texture.vs
index 0a6d918..ffc7369 100644
--- a/res/shaders/basic_texture.vs
+++ b/res/shaders/basic_texture.vs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
diff --git a/res/shaders/chunk.fs b/res/shaders/chunk.fs
index 54aaf1a..2db4fa1 100644
--- a/res/shaders/chunk.fs
+++ b/res/shaders/chunk.fs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
uniform sampler2D tex;
diff --git a/res/shaders/chunk.vs b/res/shaders/chunk.vs
index 0f3b7a4..c1c5902 100644
--- a/res/shaders/chunk.vs
+++ b/res/shaders/chunk.vs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
@@ -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;
diff --git a/res/shaders/sky.fs b/res/shaders/sky.fs
index d58fd0e..7fe1805 100644
--- a/res/shaders/sky.fs
+++ b/res/shaders/sky.fs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
uniform sampler2D tex;
uniform bool use_tex;
diff --git a/res/shaders/sky.vs b/res/shaders/sky.vs
index 8ce2a55..1b0bddd 100644
--- a/res/shaders/sky.vs
+++ b/res/shaders/sky.vs
@@ -1,4 +1,4 @@
-#version 410
+#version 330
layout (location = 0) in vec3 position;
layout (location = 1) in vec2 uv;
diff --git a/src/gfx/window.c b/src/gfx/window.c
index b4973bf..2c0bf93 100644
--- a/src/gfx/window.c
+++ b/src/gfx/window.c
@@ -77,8 +77,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);
from minecraft-weekend.
@lindevel @jurajhonsch this has been fixed with 1c14fc3 (thanks @lindevel), can either of you confirm that the new changes work?
from minecraft-weekend.
Yes it works
from minecraft-weekend.
@lindevel Great! closing this then.
from minecraft-weekend.
Related Issues (20)
- The crosshair "disappeares" in front of bright backgrounds like snow. HOT 1
- gcc makefile HOT 2
- build on Linux: mismatched bound float[4] HOT 2
- make compile error HOT 1
- NOOB I want to give this a try, But I dont seem to understand the instructions HOT 5
- make compile problem HOT 1
- Compiling dont works because of redefinitions HOT 4
- A problem with "Unix-like" compiling (on macOS 10.13.6)
- A potentially major problem with OSX Compiling HOT 1
- [1] 36812 segmentation fault (core dumped) ./bin/game HOT 3
- User placed blocks disappearing after unloading chunk
- Makefile in src ERRO
- 2023 came minecraftweekend HOT 2
- How do i access it HOT 1
- Make Command Not Working HOT 2
- pls tell me how to run on windows. i dont have unix ;( HOT 2
- Why no interpolation?
- Error compiling HOT 4
- undefined reference to `glm_ivec2_div' when building in wsl
- Add arm64 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minecraft-weekend.