List of usage examples for org.lwjgl.opengl GL30 glDeleteVertexArrays
public static void glDeleteVertexArrays(@NativeType("GLuint const *") int[] arrays)
From source file:com.voxelplugineering.voxelsniper.render.buffer.BufferManager.java
License:Open Source License
public void destroy() { GL30.glBindVertexArray(vaoId);/*from w w w .j a v a 2 s . co m*/ GL20.glDisableVertexAttribArray(0); GL20.glDisableVertexAttribArray(1); GL20.glDisableVertexAttribArray(2); for (BufferSection b : this.sections) { b.destroy(); } GL30.glBindVertexArray(0); GL30.glDeleteVertexArrays(vaoId); }
From source file:com.xrbpowered.gl.res.StaticMesh.java
License:Open Source License
public void destroy() { GL30.glBindVertexArray(vaoId);//from ww w . j ava 2s . co m for (int i = 0; i < countAttribs; i++) GL20.glDisableVertexAttribArray(i); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); GL15.glDeleteBuffers(vboId); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0); if (vboiId != GL11.GL_INVALID_VALUE) GL15.glDeleteBuffers(vboiId); GL30.glBindVertexArray(0); GL30.glDeleteVertexArrays(vaoId); }
From source file:cuchaz.jfxgl.prism.TexturedQuad.java
License:Open Source License
public void cleanup() { GL30.glDeleteVertexArrays(vaoId); GL15.glDeleteBuffers(vboId); GL15.glDeleteBuffers(iboId); // NOTE: don't cleanup the shader }
From source file:Data.Building.java
License:Apache License
@Override public void destroy() { // Disable the VBO index from the VAO attributes list GL20.glDisableVertexAttribArray(0);//from w w w .j a va 2 s. co m // Delete the VBO GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); GL15.glDeleteBuffers(vboId); // Delete the VAO GL30.glBindVertexArray(0); GL30.glDeleteVertexArrays(vaoId); }
From source file:dataAccess.lwjgl.VAO_Loader.java
/** * Cleans the memory of all VAO's and VBO's. *//* w w w . j a va 2s.c o m*/ public static void cleanUp() { vaos.forEach(x -> GL30.glDeleteVertexArrays(x)); vbos.forEach(x -> GL15.glDeleteBuffers(x)); textureMap.values().forEach(x -> GL11.glDeleteTextures(x)); }
From source file:eu.over9000.veya.rendering.ChunkVAO.java
License:Open Source License
public void dispose() { if (holdsSolid) { GL30.glDeleteVertexArrays(this.vao_handle_solid); GL15.glDeleteBuffers(this.ibo_handle_solid); GL15.glDeleteBuffers(this.vbo_handle_solid); this.vao_handle_solid = -1; this.vbo_handle_solid = -1; this.ibo_handle_solid = -1; }/*from w w w .java 2 s.c o m*/ if (holdsTransparent) { GL30.glDeleteVertexArrays(this.vao_handle_transparent); GL15.glDeleteBuffers(this.ibo_handle_transparent); GL15.glDeleteBuffers(this.vbo_handle_transparent); this.vao_handle_transparent = -1; this.vbo_handle_transparent = -1; this.ibo_handle_transparent = -1; } }
From source file:fr.ign.cogit.geoxygene.appli.gl.GLBezierShadingComplex.java
License:Open Source License
@Override public void invalidateBuffers() { if (this.vboIndicesId >= 0) { GL15.glDeleteBuffers(this.vboIndicesId); this.indicesBuffer = null; this.vboIndicesId = -1; }/*from ww w . j av a 2 s . c o m*/ if (this.vboVerticesId >= 0) { GL15.glDeleteBuffers(this.vboVerticesId); this.verticesBuffer = null; this.vboVerticesId = -1; } if (this.vaoId >= 0) { GL30.glDeleteVertexArrays(this.vaoId); this.vaoId = -1; } }
From source file:gui.lwjgl.GUIElementLoader.java
private static void destroyVAO(int vaoID) { GL30.glDeleteVertexArrays(vaoID); }
From source file:gui.lwjgl.GUIElementLoader.java
/** * Cleans the memory of all VAO's and VBO's. *///from w ww. j a va 2s. c o m public static void cleanUp() { vaos.forEach(x -> GL30.glDeleteVertexArrays(x)); vbos.forEach(x -> GL15.glDeleteBuffers(x)); textures.values().forEach(x -> GL11.glDeleteTextures(x.getTextureID())); }
From source file:io.root.gfx.glutils.GL.java
License:Apache License
public static void glDeleteVertexArrays(int n, int[] arrays, int offset) { for (int i = offset; i < offset + n; i++) { GL30.glDeleteVertexArrays(arrays[i]); }// www .j av a 2s. c om }