Examples of glBindBuffer()


Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

  /** {@inheritDoc} */
  @Override
  public void bind () {
    GL11 gl = Gdx.gl11;

    gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, bufferHandle);
    if (isDirty) {
      byteBuffer.limit(buffer.limit() * 4);
      gl.glBufferSubData(GL11.GL_ARRAY_BUFFER, 0, byteBuffer.limit(), byteBuffer);
// gl.glBufferData(GL11.GL_ARRAY_BUFFER, byteBuffer.limit(),
// byteBuffer, usage);
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

      default:
        throw new GdxRuntimeException("unkown vertex attribute type: " + attribute.usage);
      }
    }

    gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
    isBound = false;
  }

  /** Unbinds this VertexBufferObject.
   *
 
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

    } else {
      tmpHandle.clear();
      tmpHandle.put(bufferHandle);
      tmpHandle.flip();
      GL11 gl = Gdx.gl11;
      gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
      gl.glDeleteBuffers(1, tmpHandle);
      bufferHandle = 0;
    }
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

  /** {@inheritDoc} */
  @Override
  public void bind () {
    GL11 gl = Gdx.gl11;

    gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, bufferHandle);
    if (isDirty) {
      byteBuffer.limit(buffer.limit() * 4);
      gl.glBufferData(GL11.GL_ARRAY_BUFFER, byteBuffer.limit(), byteBuffer, usage);
      isDirty = false;
    }
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

      default:
        // throw new GdxRuntimeException("unkown vertex attribute type: " + attribute.usage);
      }
    }

    gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
    isBound = false;
  }

  /** Unbinds this VertexBufferObject.
   *
 
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

    } else {
      tmpHandle.clear();
      tmpHandle.put(bufferHandle);
      tmpHandle.flip();
      GL11 gl = Gdx.gl11;
      gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
      gl.glDeleteBuffers(1, tmpHandle);
      bufferHandle = 0;
    }
    BufferUtils.disposeUnsafeByteBuffer(byteBuffer);
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

      default:
        // throw new GdxRuntimeException("unkown vertex attribute type: " + attribute.usage);
      }
    }

    gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
    isBound = false;
  }
 
  /** Unbinds this VertexBufferObject.
   *
 
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

    } else {
      tmpHandle.clear();
      tmpHandle.put(bufferHandle);
      tmpHandle.flip();
      GL11 gl = Gdx.gl11;
      gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
      gl.glDeleteBuffers(1, tmpHandle);
      bufferHandle = 0;
    }
  }
}
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

  public void bind () {
    if (bufferHandle == 0) throw new GdxRuntimeException("No buffer allocated!");

    if (Gdx.gl11 != null) {
      GL11 gl = Gdx.gl11;
      gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, bufferHandle);
      if (isDirty) {
        gl.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, buffer.limit(), buffer, usage);
        isDirty = false;
      }
    } else {
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL11.glBindBuffer()

        gl.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, buffer.limit(), buffer, usage);
        isDirty = false;
      }
    } else {
      GL20 gl = Gdx.gl20;
      gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, bufferHandle);
      if (isDirty) {
        gl.glBufferData(GL20.GL_ELEMENT_ARRAY_BUFFER, buffer.limit(), buffer, usage);
        isDirty = false;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.