All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jme3.util.BufferAllocator Maven / Gradle / Ivy

There is a newer version: 3.7.0-stable
Show newest version
package com.jme3.util;

import java.nio.Buffer;
import java.nio.ByteBuffer;

/**
 * Interface to create/destroy direct buffers.
 */
public interface BufferAllocator {
    /**
     * De-allocate a direct buffer.
     *
     * @param toBeDestroyed the buffer to de-allocate (not null)
     */
    void destroyDirectBuffer(Buffer toBeDestroyed);

    /**
     * Allocate a direct ByteBuffer of the specified size.
     *
     * @param size in bytes (≥0)
     * @return a new direct buffer
     */
    ByteBuffer allocate(int size);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy