Ejemplo n.º 1
0
void GrGLVertexArray::onRelease() {
    if (0 != fID) {
        GL_CALL(DeleteVertexArrays(1, &fID));
        GPUGL->notifyVertexArrayDelete(fID);
        fID = 0;
    }
    INHERITED::onRelease();
}
void GLInstancedRendering::onResetGpuResources(ResetType resetType) {
    if (fVertexArrayID && ResetType::kDestroy == resetType) {
        GL_CALL(DeleteVertexArrays(1, &fVertexArrayID));
        this->glGpu()->notifyVertexArrayDelete(fVertexArrayID);
    }
    fVertexArrayID = 0;
    fInstanceBuffer.reset();
    fDrawIndirectBuffer.reset();
    fInstanceAttribsBufferUniqueId = SK_InvalidUniqueID;
}
Ejemplo n.º 3
0
void GLCpuPosInstancedArraysBench::teardown(const GrGLInterface* gl) {
    GR_GL_CALL(gl, BindBuffer(GR_GL_ARRAY_BUFFER, 0));
    GR_GL_CALL(gl, BindVertexArray(0));
    GR_GL_CALL(gl, BindTexture(GR_GL_TEXTURE_2D, 0));
    GR_GL_CALL(gl, BindFramebuffer(GR_GL_FRAMEBUFFER, 0));
    GR_GL_CALL(gl, DeleteTextures(1, &fTexture));
    GR_GL_CALL(gl, DeleteProgram(fProgram));
    GR_GL_CALL(gl, DeleteBuffers(fBuffers.count(), fBuffers.begin()));
    GR_GL_CALL(gl, DeleteVertexArrays(1, &fVAO));
    fBuffers.reset();
}
Ejemplo n.º 4
0
static void
release_vertex_array(struct ref* ref)
{
  struct rb_context* ctxt = NULL;
  struct rb_vertex_array* varray = NULL;
  assert(ref);

  varray = CONTAINER_OF(ref, struct rb_vertex_array, ref);
  ctxt = varray->ctxt;

  if(ctxt->state_cache.vertex_array_binding == varray->name)
    RB(bind_vertex_array(ctxt, NULL));

  OGL(DeleteVertexArrays(1, &varray->name));
  MEM_FREE(ctxt->allocator, varray);
  RB(context_ref_put(ctxt));
}
Ejemplo n.º 5
0
GL3CharacterRenderer::~GL3CharacterRenderer() {
	GL(DeleteVertexArrays(1, &bodyVao));
	GL(DeleteBuffers(1, &bodyVbo));
	GL(DeleteVertexArrays(1, &headVao));
	GL(DeleteBuffers(1, &headVbo));
}
GLInstancedRendering::~GLInstancedRendering() {
    if (fVertexArrayID) {
        GL_CALL(DeleteVertexArrays(1, &fVertexArrayID));
        this->glGpu()->notifyVertexArrayDelete(fVertexArrayID);
    }
}
Ejemplo n.º 7
0
void GLCpuPosInstancedArraysBench::teardown(const GrGLInterface* gl) {
    GR_GL_CALL(gl, DeleteProgram(fProgram));
    GR_GL_CALL(gl, DeleteBuffers(fBuffers.count(), fBuffers.begin()));
    GR_GL_CALL(gl, DeleteVertexArrays(1, &fVAO));
}
 inline void glDeleteVertexArrays(GLsizei n, const GLuint *arrays)
 {
     DeleteVertexArrays(n, arrays);
 }