This commit is contained in:
agra
2026-03-02 17:18:47 +02:00
parent ba9c4d69ce
commit 2f4f898d54
20 changed files with 418 additions and 49 deletions

View File

@@ -49,11 +49,11 @@ glGenVertexArrays : (s32, *u32) -> void = ---;
glGenBuffers : (s32, *u32) -> void = ---;
glBindVertexArray : (u32) -> void = ---;
glBindBuffer : (u32, u32) -> void = ---;
glBufferData : (u32, s64, *void, u32) -> void = ---;
glBufferData : (u32, isize, *void, u32) -> void = ---;
glVertexAttribPointer : (u32, s32, u32, u8, s32, *void) -> void = ---;
glEnableVertexAttribArray : (u32) -> void = ---;
glGetUniformLocation : (u32, [:0]u8) -> s32 = ---;
glUniformMatrix4fv : (s32, s32, u8, [16]f32) -> void = ---;
glGetUniformLocation : (u32, [*]u8) -> s32 = ---;
glUniformMatrix4fv : (s32, s32, u8, [*]f32) -> void = ---;
glUniform3f : (s32, f32, f32, f32) -> void = ---;
glDepthFunc : (u32) -> void = ---;
glUniform1f : (s32, f32) -> void = ---;
@@ -72,10 +72,11 @@ GL_ONE_MINUS_SRC_ALPHA :u32: 0x0303;
GL_TEXTURE0 :u32: 0x84C0;
GL_LINEAR :u32: 0x2601;
GL_RED :u32: 0x1903;
GL_R8 :u32: 0x8229;
GL_UNPACK_ALIGNMENT :u32: 0x0CF5;
glScissor : (s32, s32, s32, s32) -> void = ---;
glBufferSubData : (u32, s64, s64, *void) -> void = ---;
glBufferSubData : (u32, isize, isize, *void) -> void = ---;
glGenTextures : (s32, *u32) -> void = ---;
glBindTexture : (u32, u32) -> void = ---;
glTexImage2D : (u32, s32, s32, s32, s32, s32, u32, u32, *void) -> void = ---;
@@ -88,7 +89,7 @@ glPixelStorei : (u32, s32) -> void = ---;
// Loader: call once after creating GL context
// Pass in a proc loader (e.g. SDL_GL_GetProcAddress)
load_gl :: (get_proc: ([:0]u8) -> *void) {
load_gl :: (get_proc: ([*]u8) -> *void) {
glClearColor = xx get_proc("glClearColor");
glClear = xx get_proc("glClear");
glEnable = xx get_proc("glEnable");