public static Uint8Array createUint8Array(int[] array) { return JsUtils.createUint8Array(toJsArray(array)); } }
public static Uint8Array createUint8Array(byte[] array) { return JsUtils.createUint8Array(toJsArrayUnsigned(array)); }
private void tryBasicGLCalls() throws RuntimeException { Float32Array testFloat32Array = ArrayUtils.createFloat32Array(new float[]{0.0f, 1.0f, 2.0f}); if (testFloat32Array.get(0) != 0.0f || testFloat32Array.get(1) != 1.0f || testFloat32Array.get(2) != 2.0f) { Int32Array testInt32Array = ArrayUtils.createInt32Array(new int[]{0, 1, 2}); if (testInt32Array.get(0) != 0 || testInt32Array.get(1) != 1 || testInt32Array.get(2) != 2) { throw new RuntimeException("Typed Int32Array check failed"); Uint16Array testUint16Array = ArrayUtils.createUint16Array(new int[]{0, 1, 2}); if (testUint16Array.get(0) != 0 || testUint16Array.get(1) != 1 || testUint16Array.get(2) != 2) { Uint8Array testUint8Array = ArrayUtils.createUint8Array(new int[]{0, 1, 2}); if (testUint8Array.get(0) != 0 || testUint8Array.get(1) != 1 || testUint8Array.get(2) != 2) { throw new RuntimeException("Typed Uint8Array check failed");
42/2f,42/2f,z, }; gl.bufferSubData(ARRAY_BUFFER, 0, ArrayUtils.createFloat32Array(positions)); 1.0f, 0.0f, }; gl.bufferSubData(ARRAY_BUFFER, 12 * Float32Array.BYTES_PER_ELEMENT, ArrayUtils.createFloat32Array(texCoords)); indexBuffer = gl.createBuffer(); gl.bindBuffer(ELEMENT_ARRAY_BUFFER, indexBuffer); gl.bufferData(ELEMENT_ARRAY_BUFFER, ArrayUtils.createInt32Array(indices), STREAM_DRAW);
42/2f,42/2f,z, }; gl.bufferSubData(ARRAY_BUFFER, 0, ArrayUtils.createFloat32Array(positions)); 1.0f, 0.0f, }; gl.bufferSubData(ARRAY_BUFFER, 12 * Float32Array.BYTES_PER_ELEMENT, ArrayUtils.createFloat32Array(texCoords)); indexBuffer = gl.createBuffer(); gl.bindBuffer(ELEMENT_ARRAY_BUFFER, indexBuffer); gl.bufferData(ELEMENT_ARRAY_BUFFER, ArrayUtils.createInt32Array(indices), STREAM_DRAW);
public static Uint8Array createUint8Array(int[] array) { return JsUtils.createUint8Array(toJsArray(array)); } }
42/2f,42/2f,z, }; gl.bufferSubData(ARRAY_BUFFER, 0, ArrayUtils.createFloat32Array(positions)); 1.0f, 0.0f, }; gl.bufferSubData(ARRAY_BUFFER, 12 * Float32Array.BYTES_PER_ELEMENT, ArrayUtils.createFloat32Array(texCoords)); indexBuffer = gl.createBuffer(); gl.bindBuffer(ELEMENT_ARRAY_BUFFER, indexBuffer); gl.bufferData(ELEMENT_ARRAY_BUFFER, ArrayUtils.createInt32Array(indices), STREAM_DRAW);
public static Uint16Array createUint16Array(short[] array) { return JsUtils.createUint16Array(toJsArrayUnsigned(array)); }
public static Uint8Array createUint8Array(int[] array) { return JsUtils.createUint8Array(toJsArray(array)); } }
public static Uint16Array createUint16Array(short[] array) { return JsUtils.createUint16Array(toJsArrayUnsigned(array)); }
private final native void uniform2fv(WebGLUniformLocation location, JavaScriptObject v) /*-{ this.uniform2fv(location, v); }-*/;
public static Uint16Array createUint16Array(short[] array) { return JsUtils.createUint16Array(toJsArrayUnsigned(array)); }
private final native void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{ this.uniformMatrix4fv(location, transpose, value); }-*/;
public static Uint8Array createUint8Array(byte[] array) { return JsUtils.createUint8Array(toJsArrayUnsigned(array)); }
public static Uint16Array createUint16Array(int[] array) { return JsUtils.createUint16Array(toJsArray(array)); }
public static Uint8Array createUint8Array(byte[] array) { return JsUtils.createUint8Array(toJsArrayUnsigned(array)); }
private final native void uniform1iv(WebGLUniformLocation location, JavaScriptObject v) /*-{ this.uniform1iv(location, v); }-*/;
private final native void vertexAttrib3fv(int indx, JavaScriptObject values) /*-{ this.vertexAttrib3fv(indx, values); }-*/;
private final native void uniform3fv(WebGLUniformLocation location, JavaScriptObject v) /*-{ this.uniform3fv(location, v); }-*/;
private final native void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{ this.uniformMatrix2fv(location, transpose, value); }-*/;