From 36197a2de0ee6d921de50587261af8dca901d4a4 Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Sun, 12 Oct 2025 23:53:52 +0200 Subject: [PATCH] vendor/egl: a few more procedures and constants --- vendor/egl/egl.odin | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/vendor/egl/egl.odin b/vendor/egl/egl.odin index 985d58457..84f679771 100644 --- a/vendor/egl/egl.odin +++ b/vendor/egl/egl.odin @@ -25,6 +25,7 @@ OPENGL_BIT :: 0x0008 OPENGL_ES2_BIT :: 0x0004 OPENGL_ES3_BIT :: 0x00000040 +BUFFER_SIZE :: 0x3020 ALPHA_SIZE :: 0x3021 BLUE_SIZE :: 0x3022 GREEN_SIZE :: 0x3023 @@ -38,6 +39,8 @@ NONE :: 0x3038 COLOR_BUFFER_TYPE :: 0x303F RENDERABLE_TYPE :: 0x3040 CONFORMANT :: 0x3042 +VENDOR :: 0x3053 +VERSION :: 0x3054 HEIGHT :: 0x3056 WIDTH :: 0x3057 @@ -55,17 +58,38 @@ CONTEXT_OPENGL_PROFILE_MASK :: 0x30FD OPENGL_API :: 0x30A2 +CONTEXT_OPENGL_DEBUG :: 0x31B0 + +Platform :: enum u32 { + ANDROID_KHR = 0x3141, + GBM_KHR = 0x31D7, + WAYLAND_KHR = 0x31D8, + X11_KHR = 0x31D5, + X11_SCREEN_KHR = 0x31D6, + DEVICE_EXT = 0x313F, + WAYLAND_EXT = 0x31D8, + X11_EXT = 0x31D5, + X11_SCREEN_EXT = 0x31D6, + XCB_EXT = 0x31DC, + XCB_SCREEN_EXT = 0x31DE, + GBM_MESA = 0x31D7, + SURFACELESS_MESA = 0x31DD, +} + foreign import egl "system:EGL" @(default_calling_convention="c", link_prefix="egl") foreign egl { GetDisplay :: proc(display: NativeDisplayType) -> Display --- + GetPlatformDisplay :: proc(platform: Platform, native_display: rawptr, attrib_list: ^i32) -> Display --- Initialize :: proc(display: Display, major: ^i32, minor: ^i32) -> Boolean --- BindAPI :: proc(api: u32) -> Boolean --- - ChooseConfig :: proc(display: Display, attrib_list: ^i32, configs: ^Config, config_size: i32, num_config: ^i32) -> Boolean --- + ChooseConfig :: proc(display: Display, attrib_list: ^i32, configs: [^]Config, config_size: i32, num_config: ^i32) -> Boolean --- CreateWindowSurface :: proc(display: Display, config: Config, native_window: NativeWindowType, attrib_list: ^i32) -> Surface --- + CreatePlatformWindowSurface :: proc(display: Display, config: Config, native_window: rawptr, attrib_list: ^i32) -> Surface --- CreateContext :: proc(display: Display, config: Config, share_context: Context, attrib_list: ^i32) -> Context --- MakeCurrent :: proc(display: Display, draw: Surface, read: Surface, ctx: Context) -> Boolean --- QuerySurface :: proc(display: Display, surface: Surface, attribute: i32, value: ^i32) -> Boolean --- + QueryString :: proc(display: Display, name: i32) -> cstring --- SwapInterval :: proc(display: Display, interval: i32) -> Boolean --- SwapBuffers :: proc(display: Display, surface: Surface) -> Boolean --- GetProcAddress :: proc(name: cstring) -> rawptr ---