Example usage for com.google.gwt.typedarrays.client Float32Array getLength

List of usage examples for com.google.gwt.typedarrays.client Float32Array getLength

Introduction

In this page you can find the example usage for com.google.gwt.typedarrays.client Float32Array getLength.

Prototype

public final native int getLength() ;

Source Link

Document

The length of the TypedArray in elements, as fixed at construction time.

Usage

From source file:playn.html.HtmlGL20.java

License:Apache License

@Override
public void glGetUniformfv(int program, int location, FloatBuffer params) {
    Float32Array v = gl.getUniformv(getProgram(program), getUniformLocation(location));
    for (int i = 0; i < v.getLength(); i++) {
        params.put(params.position() + i, v.get(i));
    }// w  w w. ja v a  2  s  .  co m
}

From source file:playn.html.HtmlGL20.java

License:Apache License

@Override
public void glGetVertexAttribfv(int index, int pname, FloatBuffer params) {
    Float32Array v = gl.getVertexAttribv(index, pname);
    for (int i = 0; i < v.getLength(); i++) {
        params.put(params.position() + i, v.get(i));
    }//from  w w w  . ja va  2 s .co m
}