Java Code Examples for com.jogamp.opengl.GL4#glDeleteVertexArrays()

The following examples show how to use com.jogamp.opengl.GL4#glDeleteVertexArrays() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Gl_420_transform_feedback_instanced.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(Pipeline.MAX, pipelineName);
    gl4.glDeleteVertexArrays(Pipeline.MAX, vertexArrayName);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName[Pipeline.TRANSFORM]);
    gl4.glDeleteProgram(programName[Pipeline.FEEDBACK]);
    gl4.glDeleteTransformFeedbacks(1, feedbackName);

    BufferUtils.destroyDirectBuffer(pipelineName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(feedbackName);

    return true;
}
 
Example 2
Source File: Gl_440_buffer_type.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    if (uniformPointer == null) {

        gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM));
        gl4.glUnmapBuffer(GL_UNIFORM_BUFFER);
        BufferUtils.destroyDirectBuffer(uniformPointer);
    }

    gl4.glDeleteBuffers(Buffer.MAX,  bufferName);
    BufferUtils.destroyDirectBuffer(bufferName);
    gl4.glDeleteVertexArrays(VertexFormat.MAX,  vertexArrayName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    gl4.glDeleteProgramPipelines(1,  pipelineName);
    BufferUtils.destroyDirectBuffer(pipelineName);
    gl4.glDeleteProgram(programName);

    return true;
}
 
Example 3
Source File: Gl_410_primitive_tessellation5.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteBuffers(1, arrayBufferName);
    for (int i = 0; i < Program.MAX; ++i) {
        gl4.glDeleteProgram(programName[i]);
    }
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(arrayBufferName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return checkError(gl4, "end");
}
 
Example 4
Source File: Gl_400_sampler_fetch.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return checkError(gl4, "end");
}
 
Example 5
Source File: Gl_420_texture_cube.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteSamplers(1, samplerName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(samplerName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 6
Source File: Gl_400_fbo_multisample.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(Texture.MAX, textureName);
    gl4.glDeleteFramebuffers(Framebuffer.MAX, framebufferName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteSamplers(1, samplerName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(framebufferName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(samplerName);

    return true;
}
 
Example 7
Source File: Gl_430_query_conditional.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(1, pipelineName);
    BufferUtils.destroyDirectBuffer(pipelineName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    BufferUtils.destroyDirectBuffer(bufferName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    gl4.glDeleteQueries(1, queryName);
    BufferUtils.destroyDirectBuffer(queryName);

    return checkError(gl4, "end");
}
 
Example 8
Source File: Gl_420_memory_barrier.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteTextures(Texture.MAX, textureName);
    gl4.glDeleteFramebuffers(1, framebufferName);
    gl4.glDeleteProgram(programName[Program.BLIT]);
    gl4.glDeleteProgram(programName[Program.UPDATE]);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteSamplers(1, samplerName);
    gl4.glDeleteProgramPipelines(Pipeline.MAX, pipelineName);

    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(framebufferName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(samplerName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 9
Source File: Gl_410_primitive_instanced.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgram(programName[Program.VERT]);
    gl4.glDeleteProgram(programName[Program.FRAG]);
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 10
Source File: Gl_420_image_load.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgram(programName[Program.VERT]);
    gl4.glDeleteProgram(programName[Program.FRAG]);
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 11
Source File: Gl_420_texture_array.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteSamplers(1, samplerName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(samplerName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return true;
}
 
Example 12
Source File: Gl_420_image_unpack.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgram(programName[Program.VERT]);
    gl4.glDeleteProgram(programName[Program.FRAG]);
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 13
Source File: Gl_420_texture_storage.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(1, pipelineName);
    gl4.glDeleteProgram(programName[Program.FRAGMENT]);
    gl4.glDeleteProgram(programName[Program.VERTEX]);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);

    BufferUtils.destroyDirectBuffer(pipelineName);
    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return true;
}
 
Example 14
Source File: Gl_420_texture_compressed.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(1, pipelineName);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(Texture.MAX, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteSamplers(1, samplerName);

    BufferUtils.destroyDirectBuffer(pipelineName);
    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(samplerName);

    return true;
}
 
Example 15
Source File: Gl_420_texture_pixel_store.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(1, pipelineName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteTextures(1, textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);

    BufferUtils.destroyDirectBuffer(pipelineName);
    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(textureName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return true;
}
 
Example 16
Source File: Gl_410_program_64.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgram(programName[Program.VERT]);
    gl4.glDeleteProgram(programName[Program.FRAG]);
    gl4.glBindProgramPipeline(0);
    gl4.glDeleteProgramPipelines(1, pipelineName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(pipelineName);

    return true;
}
 
Example 17
Source File: Gl_450_texture_barrier.java    From jogl-samples with MIT License 6 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteProgramPipelines(Pipeline.MAX, pipelineName);
    BufferUtils.destroyDirectBuffer(pipelineName);
    gl4.glDeleteProgram(programName[Pipeline.SPLASH]);
    gl4.glDeleteProgram(programName[Pipeline.TEXTURE]);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    BufferUtils.destroyDirectBuffer(bufferName);
    gl4.glDeleteFramebuffers(1, framebufferName);
    BufferUtils.destroyDirectBuffer(framebufferName);
    gl4.glDeleteTextures(Texture.MAX, textureName);
    BufferUtils.destroyDirectBuffer(textureName);
    gl4.glDeleteVertexArrays(Pipeline.MAX, vertexArrayName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return true;
}
 
Example 18
Source File: Gl_450_texture_derivative.java    From jogl-samples with MIT License 5 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    BufferUtils.destroyDirectBuffer(bufferName);
    gl4.glDeleteProgram(programName);
    gl4.glDeleteTextures(1, textureName);
    BufferUtils.destroyDirectBuffer(textureName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return true;
}
 
Example 19
Source File: Gl_400_primitive_smooth_shading.java    From jogl-samples with MIT License 5 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteProgram(programName[0]);
    gl4.glDeleteProgram(programName[1]);

    BufferUtils.destroyDirectBuffer(vertexArrayName);
    BufferUtils.destroyDirectBuffer(bufferName);

    return checkError(gl4, "end");
}
 
Example 20
Source File: Gl_400_program_64.java    From jogl-samples with MIT License 5 votes vote down vote up
@Override
protected boolean end(GL gl) {

    GL4 gl4 = (GL4) gl;

    gl4.glDeleteBuffers(Buffer.MAX, bufferName);
    gl4.glDeleteVertexArrays(1, vertexArrayName);
    gl4.glDeleteProgram(programName);

    BufferUtils.destroyDirectBuffer(bufferName);
    BufferUtils.destroyDirectBuffer(vertexArrayName);

    return checkError(gl4, "end");
}