diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2025-03-12 18:39:57 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2025-03-12 18:39:57 +0100 |
| commit | b76fd84084c79fa54b0e5546a91983697a2c2687 (patch) | |
| tree | 7f67c75262f3fb21d9f07c0567d1b74f0b8b754e /core/sys/wasm | |
| parent | d3b1aaad18e7a1445992aea76dfb6fa00e5a9d80 (diff) | |
webgl: add `BlendEquationSeparate` and `GetParameter4i`
`GetParameter4i` can be used to retrieve the current scissor rect, or
the curent viewport, which was previously impossible.
Also adds `BlendEquationSeparate` which seemed to be missing.
Also removes an instance of `do`.
Diffstat (limited to 'core/sys/wasm')
| -rw-r--r-- | core/sys/wasm/js/odin.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/sys/wasm/js/odin.js b/core/sys/wasm/js/odin.js index 29227c526..59146590c 100644 --- a/core/sys/wasm/js/odin.js +++ b/core/sys/wasm/js/odin.js @@ -402,6 +402,9 @@ class WebGLInterface { BlendEquation: (mode) => { this.ctx.blendEquation(mode); }, + BlendEquationSeparate: (modeRGB, modeAlpha) => { + this.ctx.blendEquationSeparate(modeRGB, modeAlpha); + }, BlendFunc: (sfactor, dfactor) => { this.ctx.blendFunc(sfactor, dfactor); }, @@ -633,6 +636,13 @@ class WebGLInterface { GetParameter: (pname) => { return this.ctx.getParameter(pname); }, + GetParameter4i: (pname, v0, v1, v2, v3) => { + const i4 = this.ctx.getParameter(pname); + this.mem.storeI32(v0, i4[0]); + this.mem.storeI32(v1, i4[1]); + this.mem.storeI32(v2, i4[2]); + this.mem.storeI32(v3, i4[3]); + }, GetProgramParameter: (program, pname) => { return this.ctx.getProgramParameter(this.programs[program], pname) }, |