Ejemplo n.º 1
0
  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);
  }
Ejemplo n.º 2
0
  /** 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();
    }
  }
Ejemplo n.º 3
0
 public static synchronized void glDeleteBuffers(GL11 gl, int n, int[] buffers, int offset) {
   gl.glDeleteBuffers(n, buffers, offset);
 }
Ejemplo n.º 4
0
 @Override
 public void glDeleteBuffers(int n, IntBuffer buffers) {
   gl.glDeleteBuffers(n, buffers);
 }
Ejemplo n.º 5
0
 @Override
 public void glDeleteBuffers(int n, int[] buffers, int offset) {
   gl.glDeleteBuffers(n, buffers, offset);
 }
Ejemplo n.º 6
0
 public static void deleteBuffer(final GL11 pGL11, final int pHardwareBufferID) {
   GLHelper.HARDWAREBUFFERID_CONTAINER[0] = pHardwareBufferID;
   pGL11.glDeleteBuffers(1, GLHelper.HARDWAREBUFFERID_CONTAINER, 0);
 }