ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: a490319548ae165bd9ad3eae10e2d680bec60aa7
Parent: 967c85478d5a865770364961791378b04cdefae3
Author: Randy Palamar
Date:   Mon,  5 May 2025 22:16:15 -0600

os: move get_native_gl_context into main files

even though these are culled everywhere apart from the main
application gcc still complains about undefined references to
glfwGetWGLContext. Bad compiler but I do think that window
specific functions don't need to stay in the shared platform
layer.

Diffstat:
Mmain_linux.c | 9+++++++++
Mmain_w32.c | 10+++++++++-
Mos_linux.c | 9---------
Mos_win32.c | 8--------
4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/main_linux.c b/main_linux.c @@ -17,6 +17,15 @@ #define OS_PATH_SEPERATOR "/" +/* TODO(rnp): what do if not X11? */ +iptr glfwGetGLXContext(iptr); + +function iptr +os_get_native_gl_context(iptr window) +{ + return glfwGetGLXContext(window); +} + #include "static.c" function void diff --git a/main_w32.c b/main_w32.c @@ -17,9 +17,17 @@ #define OS_PATH_SEPERATOR "\\" +iptr glfwGetWGLContext(iptr); + +function iptr +os_get_native_gl_context(iptr window) +{ + return glfwGetWGLContext(window); +} + #include "static.c" -static void +function void dispatch_file_watch(OS *os, FileWatchDirectory *fw_dir, u8 *buf, Arena arena) { i64 offset = 0; diff --git a/os_linux.c b/os_linux.c @@ -276,12 +276,3 @@ static OS_WAKE_WAITERS_FN(os_wake_waiters) syscall(SYS_futex, sync, FUTEX_WAKE, I32_MAX, 0, 0, 0); } } - -/* TODO(rnp): what do if not X11? */ -iptr glfwGetGLXContext(iptr); - -static iptr -os_get_native_gl_context(iptr window) -{ - return glfwGetGLXContext(window); -} diff --git a/os_win32.c b/os_win32.c @@ -364,11 +364,3 @@ static OS_WAKE_WAITERS_FN(os_wake_waiters) WakeByAddressAll(sync); } } - -iptr glfwGetWGLContext(iptr); - -static iptr -os_get_native_gl_context(iptr window) -{ - return glfwGetWGLContext(window); -}