aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-18 13:08:31 +0100
committergingerBill <bill@gingerbill.org>2022-05-18 13:08:31 +0100
commit3bb31093fa663afd0368cc4d904ea1eda0694f0e (patch)
tree801b46d32bbe8846ff6f65adab55f81730a37be8
parent214b43974dbd4631e43c110819807dcde2f5e64d (diff)
Add documentation for `CreateCurrentContextById` and `SetCurrentContextById`
-rw-r--r--vendor/wasm/WebGL/webgl.odin7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/wasm/WebGL/webgl.odin b/vendor/wasm/WebGL/webgl.odin
index d3d24f470..04efc785b 100644
--- a/vendor/wasm/WebGL/webgl.odin
+++ b/vendor/wasm/WebGL/webgl.odin
@@ -29,9 +29,12 @@ DEFAULT_CONTEXT_ATTRIBUTES :: ContextAttributes{}
@(default_calling_convention="c")
foreign webgl {
- CreateCurrentContextById :: proc(name: string, attributes := DEFAULT_CONTEXT_ATTRIBUTES) -> bool ---
- GetCurrentContextAttributes :: proc() -> ContextAttributes ---
+ // CreateCurrentContextById must be called before `GetCurrentContextAttributes` if the user wants to
+ // set specific attributes, otherwise the default attributes will be set for the WebGL context
+ CreateCurrentContextById :: proc(name: string, attributes: ContextAttributes) -> bool ---
+ // Acquire the WebGL context from a canvas element by id
SetCurrentContextById :: proc(name: string) -> bool ---
+ GetCurrentContextAttributes :: proc() -> ContextAttributes ---
DrawingBufferWidth :: proc() -> i32 ---
DrawingBufferHeight :: proc() -> i32 ---