List of usage examples for com.google.gwt.typedarrays.shared Float32Array set
void set(float[] array);
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
/** * <p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to * {@code target}. Data starting at byte offset {@code offset} and extending for {@code size} bytes is copied to the * data store from the memory pointed to by {@code data}. An error is thrown if {@code offset} and {@code size} * together define a range beyond the bounds of the buffer object's data store.</p> * * <p>{@link #GL_INVALID_ENUM} is generated if target is not {@link #GL_ARRAY_BUFFER} or {@link * #GL_ELEMENT_ARRAY_BUFFER}.</p>//from ww w . j a v a 2s. com * * <p>{@link #GL_INVALID_VALUE} is generated if offset or size is negative, or if together they define a region of * memory that extends beyond the buffer object's allocated data store.</p> * * <p>{@link #GL_INVALID_OPERATION} is generated if the reserved buffer object name 0 is bound to target.</p> * * @param target Specifies the target buffer object. The symbolic constant must be {@link #GL_ARRAY_BUFFER} or * {@link #GL_ELEMENT_ARRAY_BUFFER}. * @param offset Specifies the offset into the buffer object's data store where data replacement will begin, * measured in bytes. * @param size Specifies the size in bytes of the data store region being replaced. * @param data Specifies the new data that will be copied into the data store. */ public static void glBufferSubData(int target, int offset, int size, float[] data) { checkContextCompatibility(); Float32Array dataBuffer = Float32ArrayNative.create(data.length); dataBuffer.set(data); nglBufferSubData(target, offset, size, dataBuffer); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glUniformMatrix2fv(int location, boolean transpose, float[] value) { Float32Array array = TypedArrays.createFloat32Array(value.length); array.set(value); glUniformMatrix2fv(location, transpose, array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glUniformMatrix3fv(int location, boolean transpose, float[] value) { Float32Array array = TypedArrays.createFloat32Array(value.length); array.set(value); glUniformMatrix3fv(location, transpose, array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glUniformMatrix4fv(int location, boolean transpose, float[] value) { Float32Array array = TypedArrays.createFloat32Array(value.length); array.set(value); glUniformMatrix4fv(location, transpose, array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glVertexAttrib1fv(int index, float[] values) { Float32Array float32Array = TypedArrays.createFloat32Array(values.length); float32Array.set(values); glVertexAttrib1fv(index, float32Array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glVertexAttrib2fv(int index, float[] values) { Float32Array float32Array = TypedArrays.createFloat32Array(values.length); float32Array.set(values); glVertexAttrib2fv(index, float32Array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glVertexAttrib3fv(int index, float[] values) { Float32Array float32Array = TypedArrays.createFloat32Array(values.length); float32Array.set(values); glVertexAttrib3fv(index, float32Array); }
From source file:com.shc.webgl4j.client.WebGL10.java
License:Open Source License
public static void glVertexAttrib4fv(int index, float[] values) { Float32Array float32Array = TypedArrays.createFloat32Array(values.length); float32Array.set(values); glVertexAttrib4fv(index, float32Array); }