mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix storeInt call in webgl glue code
This commit is contained in:
Vendored
+5
-5
@@ -416,7 +416,7 @@ class WebGLInterface {
|
|||||||
log = log.substring(0, n);
|
log = log.substring(0, n);
|
||||||
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log))
|
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log))
|
||||||
|
|
||||||
storeInt(length_ptr, n);
|
this.mem.storeInt(length_ptr, n);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GetShaderInfoLog: (shader, buf_ptr, buf_len, length_ptr) => {
|
GetShaderInfoLog: (shader, buf_ptr, buf_len, length_ptr) => {
|
||||||
@@ -429,7 +429,7 @@ class WebGLInterface {
|
|||||||
log = log.substring(0, n);
|
log = log.substring(0, n);
|
||||||
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log))
|
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log))
|
||||||
|
|
||||||
storeInt(length_ptr, n);
|
this.mem.storeInt(length_ptr, n);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GetShaderiv: (shader, pname, p) => {
|
GetShaderiv: (shader, pname, p) => {
|
||||||
@@ -439,11 +439,11 @@ class WebGLInterface {
|
|||||||
if (log === null) {
|
if (log === null) {
|
||||||
log = "(unknown error)";
|
log = "(unknown error)";
|
||||||
}
|
}
|
||||||
storeInt(p, log.length+1);
|
this.mem.storeInt(p, log.length+1);
|
||||||
} else if (pname == 35720) {
|
} else if (pname == 35720) {
|
||||||
let source = this.ctx.getShaderSource(this.shaders[shader]);
|
let source = this.ctx.getShaderSource(this.shaders[shader]);
|
||||||
let sourceLength = (source === null || source.length == 0) ? 0 : source.length+1;
|
let sourceLength = (source === null || source.length == 0) ? 0 : source.length+1;
|
||||||
storeInt(p, sourceLength);
|
this.mem.storeInt(p, sourceLength);
|
||||||
} else {
|
} else {
|
||||||
let param = this.ctx.getShaderParameter(this.shaders[shader], pname);
|
let param = this.ctx.getShaderParameter(this.shaders[shader], pname);
|
||||||
this.mem.storeI32(p, param);
|
this.mem.storeI32(p, param);
|
||||||
@@ -994,7 +994,7 @@ class WebGLInterface {
|
|||||||
let n = Math.min(buf_len, name.length);
|
let n = Math.min(buf_len, name.length);
|
||||||
name = name.substring(0, n);
|
name = name.substring(0, n);
|
||||||
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(name))
|
this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(name))
|
||||||
storeInt(length_ptr, n);
|
this.mem.storeInt(length_ptr, n);
|
||||||
},
|
},
|
||||||
UniformBlockBinding: (program, uniformBlockIndex, uniformBlockBinding) => {
|
UniformBlockBinding: (program, uniformBlockIndex, uniformBlockBinding) => {
|
||||||
this.assertWebGL2();
|
this.assertWebGL2();
|
||||||
|
|||||||
Reference in New Issue
Block a user