当前位置: 首页>>代码示例>>Java>>正文


Java BufferUtils.disposeUnsafeByteBuffer方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:24,代码来源:VertexBufferObject.java

示例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);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:10,代码来源:VertexBufferObject.java

示例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);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:9,代码来源:IndexBufferObject.java

示例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);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:14,代码来源:FreeType.java

示例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);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:9,代码来源:FreeType.java

示例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);
}
 
开发者ID:kennux,项目名称:libgdx-opencl,代码行数:13,代码来源:DynamicVertexBufferObject.java

示例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;
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:29,代码来源:IndexBufferObject.java

示例8: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
@Override
public void dispose() {
	gl20.glDeleteBuffer(handle);
	BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
 
开发者ID:code-disaster,项目名称:libgdx-snippets,代码行数:6,代码来源:GLBufferObject.java

示例9: disposePreparedData

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void disposePreparedData () {
	if (compressedData != null) BufferUtils.disposeUnsafeByteBuffer(compressedData);
	compressedData = null;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:5,代码来源:KTXTextureData.java

示例10: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
@Override
public void dispose () {
	BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:5,代码来源:VertexArray.java

示例11: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Releases the native resources of the ETC1Data instance. */
public void dispose () {
	BufferUtils.disposeUnsafeByteBuffer(compressedData);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:5,代码来源:ETC1.java

示例12: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
/** Disposes this IndexArray and all its associated OpenGL resources. */
public void dispose () {
	BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:5,代码来源:IndexArray.java

示例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);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:7,代码来源:FreeType.java

示例14: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public void dispose()
{
  BufferUtils.disposeUnsafeByteBuffer(this.byteBuffer);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:VertexArray.java

示例15: dispose

import com.badlogic.gdx.utils.BufferUtils; //导入方法依赖的package包/类
public final void dispose()
{
  BufferUtils.disposeUnsafeByteBuffer(this.compressedData);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:ETC1$ETC1Data.java


注:本文中的com.badlogic.gdx.utils.BufferUtils.disposeUnsafeByteBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。