Example usage for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array

List of usage examples for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array

Introduction

In this page you can find the example usage for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array.

Prototype

public static Float32Array createFloat32Array(int length) 

Source Link

Document

Create a Float32Array instance of length elements, backed by a new ArrayBuffer .

Usage

From source file:com.badlogic.gdx.backends.gwt.GwtGL20.java

License:Apache License

private void ensureCapacity(FloatBuffer buffer) {
    if (buffer.remaining() > floatBuffer.length()) {
        floatBuffer = TypedArrays.createFloat32Array(buffer.remaining());
    }//from   w  ww .  jav a 2  s.  co  m
}

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);//from  ww  w  .  jav a  2 s  . c o  m
    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);//from w  ww .j ava 2 s .  c  o  m
    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);// ww  w . j  a  v a2  s.  c  om
    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);
}