[Bindings/Odin] Add get/set current context method to Odin bindings (#252)

This commit is contained in:
Dan Korostelev 2025-02-08 06:51:55 +01:00 committed by GitHub
parent 5b0e5ea456
commit b4102400ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -339,6 +339,8 @@ ErrorHandler :: struct {
userData: rawptr
}
Context :: struct {} // opaque structure, only use as a pointer
@(link_prefix = "Clay_", default_calling_convention = "c")
foreign Clay {
MinMemorySize :: proc() -> u32 ---
@ -355,6 +357,8 @@ foreign Clay {
SetMeasureTextFunction :: proc(measureTextFunction: proc "c" (text: StringSlice, config: ^TextElementConfig, userData: uintptr) -> Dimensions, userData: uintptr) ---
RenderCommandArray_Get :: proc(array: ^ClayArray(RenderCommand), index: i32) -> ^RenderCommand ---
SetDebugModeEnabled :: proc(enabled: bool) ---
GetCurrentContext :: proc() -> ^Context ---
SetCurrentContext :: proc(ctx: ^Context) ---
}
@(link_prefix = "Clay_", default_calling_convention = "c", private)