Esempio n. 1
0
  public void display(GL3 gl) {
    model.bindBuffer(gl);
    // TODO separate shader uniforms
    for (Map.Entry<String, Object> entry : model.getShaderUniforms().entrySet()) {
      shader.setUniform(gl, entry.getKey(), entry.getValue());
    }
    // draw the triangles
    gl.glDrawElements(GL3.GL_TRIANGLES, model.getIndexCount(), GL3.GL_UNSIGNED_INT, 0);

    model.unbindBuffer(gl);
  }
Esempio n. 2
0
 public void dispose(GL3 gl) {
   shader.destroy(gl);
 }