예제 #1
0
파일: Grid.java 프로젝트: ksaua/mousekiller
  public void releaseHardwareBuffers(GL10 gl) {
    GL11 gl11 = (GL11) gl;
    int[] buffer = new int[1];
    buffer[0] = vertexbufferId;
    gl11.glDeleteBuffers(1, buffer, 0);

    buffer[0] = texturebufferId;
    gl11.glDeleteBuffers(1, buffer, 0);

    buffer[0] = indexbufferId;
    gl11.glDeleteBuffers(1, buffer, 0);
  }
예제 #2
0
파일: Grid.java 프로젝트: peterdocter/zed
  /** Deletes the hardware buffers allocated by this object (if any). */
  public void releaseHardwareBuffers(GL10 gl) {
    if (mUseHardwareBuffers) {
      if (gl instanceof GL11) {
        GL11 gl11 = (GL11) gl;
        int[] buffer = new int[1];
        buffer[0] = mVertBufferIndex;
        gl11.glDeleteBuffers(1, buffer, 0);

        buffer[0] = mTextureCoordBufferIndex;
        gl11.glDeleteBuffers(1, buffer, 0);

        buffer[0] = mIndexBufferIndex;
        gl11.glDeleteBuffers(1, buffer, 0);
      }

      invalidateHardwareBuffers();
    }
  }
예제 #3
0
 public static synchronized void glDeleteBuffers(GL11 gl, int n, int[] buffers, int offset) {
   gl.glDeleteBuffers(n, buffers, offset);
 }
예제 #4
0
 @Override
 public void glDeleteBuffers(int n, IntBuffer buffers) {
   gl.glDeleteBuffers(n, buffers);
 }
예제 #5
0
 @Override
 public void glDeleteBuffers(int n, int[] buffers, int offset) {
   gl.glDeleteBuffers(n, buffers, offset);
 }
예제 #6
0
 public static void deleteBuffer(final GL11 pGL11, final int pHardwareBufferID) {
   GLHelper.HARDWAREBUFFERID_CONTAINER[0] = pHardwareBufferID;
   pGL11.glDeleteBuffers(1, GLHelper.HARDWAREBUFFERID_CONTAINER, 0);
 }