free opengl resources
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package chess.view.DDDrender;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import chess.view.DDDrender.opengl.VertexArray;
|
||||
|
||||
public class DDDModel {
|
||||
public class DDDModel implements Closeable {
|
||||
private final List<VertexArray> vaos;
|
||||
|
||||
public DDDModel(List<VertexArray> vaos) {
|
||||
@@ -15,4 +17,11 @@ public class DDDModel {
|
||||
return vaos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
for (VertexArray vertexArray : vaos) {
|
||||
vertexArray.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user