summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-02-11 17:25:24 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-02-11 17:25:24 +0100
commit80da54bb97c279aa60fb77a9bbad9baa0f2e4477 (patch)
tree099b3c5148adefe4cfd8b44b16da4ea28bbce670 /source
parentadde339f3f750c0c19912d1893d51ec49cb8ee70 (diff)
downloadsaw-80da54bb97c279aa60fb77a9bbad9baa0f2e4477.zip
Use default GL version; Use GL core on Linux
Diffstat (limited to 'source')
-rw-r--r--source/saw/_dep.c2
-rw-r--r--source/saw/main.c22
2 files changed, 11 insertions, 13 deletions
diff --git a/source/saw/_dep.c b/source/saw/_dep.c
index dab6342..fd52289 100644
--- a/source/saw/_dep.c
+++ b/source/saw/_dep.c
@@ -1,4 +1,4 @@
-#if defined(__EMSCRIPTEN__) || defined(__linux__)
+#if defined(__EMSCRIPTEN__)
# define SOKOL_GLES3
# define NANOVG_GLES3 1
#else
diff --git a/source/saw/main.c b/source/saw/main.c
index 313d779..eba5c00 100644
--- a/source/saw/main.c
+++ b/source/saw/main.c
@@ -5,7 +5,7 @@
#include "../kit/secure_random.h"
#include "../kit/file.h"
-#if defined(__EMSCRIPTEN__) || defined(__linux__)
+#if defined(__EMSCRIPTEN__)
# include <GLES3/gl3.h>
# define SOKOL_GLES3
# define NANOVG_GLES3 1
@@ -1635,7 +1635,7 @@ static void saw_frame(void) {
glViewport(0, 0, frame_width, frame_height);
glClearColor(.15f, .12f, .10f, 1.f);
-#if defined(__EMSCRIPTEN__) || defined(__linux__)
+#if defined(__EMSCRIPTEN__)
glClearDepthf(1.f);
#else
glClearDepth(1.);
@@ -2019,15 +2019,13 @@ sapp_desc sokol_main(i32 argc, char **argv) {
fflush(stdout);
return (sapp_desc) {
- .window_title = "Saw",
- .width = 1280,
- .height = 720,
- .init_cb = saw_init,
- .frame_cb = saw_frame,
- .cleanup_cb = saw_cleanup,
- .event_cb = saw_event,
- .gl_major_version = 3,
- .gl_minor_version = 2,
- .logger.func = log_,
+ .window_title = "Saw",
+ .width = 1280,
+ .height = 720,
+ .init_cb = saw_init,
+ .frame_cb = saw_frame,
+ .cleanup_cb = saw_cleanup,
+ .event_cb = saw_event,
+ .logger.func = log_,
};
}