本文整理汇总了Java中com.badlogic.gdx.utils.BufferUtils.disposeUnsafeByteBuffer方法的典型用法代码示例。如果您正苦于以下问题:Java BufferUtils.disposeUnsafeByteBuffer方法的具体用法?Java BufferUtils.disposeUnsafeByteBuffer怎么用?Java BufferUtils.disposeUnsafeByteBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.utils.BufferUtils
的用法示例。
在下文中一共展示了BufferUtils.disposeUnsafeByteBuffer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void dispose()
{
if (Gdx.gl20 != null)
{
tmpHandle.clear();
tmpHandle.put(this.bufferHandle);
tmpHandle.flip();
GL20 localGL20 = Gdx.gl20;
localGL20.glBindBuffer(34962, 0);
localGL20.glDeleteBuffers(1, tmpHandle);
}
for (this.bufferHandle = 0; ; this.bufferHandle = 0)
{
BufferUtils.disposeUnsafeByteBuffer(this.byteBuffer);
return;
tmpHandle.clear();
tmpHandle.put(this.bufferHandle);
tmpHandle.flip();
GL11 localGL11 = Gdx.gl11;
localGL11.glBindBuffer(34962, 0);
localGL11.glDeleteBuffers(1, tmpHandle);
}
}
示例2: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Disposes of all resources this VertexBufferObject uses. */
@Override
public void dispose () {
GL20 gl = Gdx.gl20;
gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
gl.glDeleteBuffer(bufferHandle);
bufferHandle = 0;
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例3: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Disposes this IndexBufferObject and all its associated OpenGL resources. */
public void dispose () {
Gdx.gl20.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0);
Gdx.gl20.glDeleteBuffer(bufferHandle);
bufferHandle = 0;
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例4: newMemoryFace
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public static Face newMemoryFace(Library library, byte[] data, int dataSize, int faceIndex) {
ByteBuffer buffer = BufferUtils.newUnsafeByteBuffer(data.length);
BufferUtils.copy(data, 0, buffer, data.length);
long address = newMemoryFace(library.address, buffer, dataSize, faceIndex);
if(address == 0) {
BufferUtils.disposeUnsafeByteBuffer(buffer);
throw new GdxRuntimeException("Couldn't load font");
}
else {
library.fontData.put(address, buffer);
return new Face(address, library);
}
}
示例5: doneFace
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public static void doneFace(Face face) {
doneFace(face.address);
ByteBuffer buffer = face.library.fontData.get(face.address);
if(buffer != null) {
face.library.fontData.remove(face.address);
BufferUtils.disposeUnsafeByteBuffer(buffer);
}
}
示例6: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Disposes of all resources this VertexBufferObject uses. */
@Override
public void dispose () {
tmpHandle.clear();
tmpHandle.put(bufferHandle);
tmpHandle.flip();
GL20 gl = Gdx.gl20;
gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0);
gl.glDeleteBuffers(1, tmpHandle);
bufferHandle = 0;
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例7: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void dispose()
{
if (Gdx.gl20 != null)
{
tmpHandle.clear();
tmpHandle.put(this.bufferHandle);
tmpHandle.flip();
GL20 localGL20 = Gdx.gl20;
localGL20.glBindBuffer(34963, 0);
localGL20.glDeleteBuffers(1, tmpHandle);
this.bufferHandle = 0;
}
while (true)
{
BufferUtils.disposeUnsafeByteBuffer(this.byteBuffer);
return;
if (Gdx.gl11 != null)
{
tmpHandle.clear();
tmpHandle.put(this.bufferHandle);
tmpHandle.flip();
GL11 localGL11 = Gdx.gl11;
localGL11.glBindBuffer(34963, 0);
localGL11.glDeleteBuffers(1, tmpHandle);
this.bufferHandle = 0;
}
}
}
示例8: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
@Override
public void dispose() {
gl20.glDeleteBuffer(handle);
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例9: disposePreparedData
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void disposePreparedData () {
if (compressedData != null) BufferUtils.disposeUnsafeByteBuffer(compressedData);
compressedData = null;
}
示例10: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
@Override
public void dispose () {
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例11: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Releases the native resources of the ETC1Data instance. */
public void dispose () {
BufferUtils.disposeUnsafeByteBuffer(compressedData);
}
示例12: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Disposes this IndexArray and all its associated OpenGL resources. */
public void dispose () {
BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
示例13: doneFreeType
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public static void doneFreeType(Library library) {
doneFreeType(library.address);
for(ByteBuffer buffer: library.fontData.values()) {
BufferUtils.disposeUnsafeByteBuffer(buffer);
}
}
示例14: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void dispose()
{
BufferUtils.disposeUnsafeByteBuffer(this.byteBuffer);
}
示例15: dispose
import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public final void dispose()
{
BufferUtils.disposeUnsafeByteBuffer(this.compressedData);
}