From 80da54bb97c279aa60fb77a9bbad9baa0f2e4477 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 11 Feb 2024 17:25:24 +0100 Subject: Use default GL version; Use GL core on Linux --- source/saw/_dep.c | 2 +- source/saw/main.c | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'source') 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 # 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_, }; } -- cgit v1.2.3