Code example for FloatBuffer

Methods: put

0
    public TextureWrapRenderer(Context context)
    { 
         
        mVertices = ByteBuffer.allocateDirect(mVerticesData.length * 4)
                .order(ByteOrder.nativeOrder()).asFloatBuffer();
        mVertices.put(mVerticesData).position(0);
        mIndices = ByteBuffer.allocateDirect(mIndicesData.length * 2)
                .order(ByteOrder.nativeOrder()).asShortBuffer();
        mIndices.put(mIndicesData).position(0);
    } 
 
    /// 
    //  Generate an RGB8 checkerboard image 
    // 
    private ByteBuffer genCheckImage( int width, int height, int checkSize )
    { 
        int x,
            y;
        byte[] pixels = new byte[width * height * 3];
    
Contextual code suggestions in your IDE  Get Codota for Java