Android FloatBuffer Create createFloatBuffer(int floatCount)

Here you can find the source of createFloatBuffer(int floatCount)

Description

create Float Buffer

License

Open Source License

Declaration

public static FloatBuffer createFloatBuffer(int floatCount) 

Method Source Code

//package com.java2s;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;

public class Main {
    public static FloatBuffer createFloatBuffer(int floatCount) {
        ByteBuffer data = ByteBuffer.allocateDirect(floatCount * 4);
        data.order(ByteOrder.nativeOrder());
        FloatBuffer p1 = data.asFloatBuffer();
        return p1;
    }//from   w  w w  . jav a  2  s .  c o  m
}

Related

  1. newFloatBuffer(int numFloats)
  2. createFloatBuffer(float[] data)
  3. createFloatBuffer(float[] floatData)
  4. createFloatBuffer(float[] floatData)
  5. createFloatBuffer(int capacity)
  6. createFloatBuffer(int nElements, int stride)
  7. createFloatBuffer(int nElements, int stride)
  8. createFloatBuffer(int size)
  9. createFloatBuffer(int size)