adding destroy to the plane
This commit is contained in:
parent
4b51802309
commit
be4a13c1d0
|
@ -19,15 +19,15 @@ public class Test extends Game {
|
||||||
public Shader shader;
|
public Shader shader;
|
||||||
|
|
||||||
public Mesh plane = new Mesh(new Vertex[] {
|
public Mesh plane = new Mesh(new Vertex[] {
|
||||||
new Vertex(new Vector3f(-20, 20, 0), new Vector2f(0, 0)),
|
new Vertex(new Vector3f(-20, 20, 1), new Vector2f(0, 0)),
|
||||||
new Vertex(new Vector3f(-20, -20, 0), new Vector2f(0, 1)),
|
new Vertex(new Vector3f(-20, -20, 1), new Vector2f(0, 1)),
|
||||||
new Vertex(new Vector3f(20, -20, 0), new Vector2f(1, 1)),
|
new Vertex(new Vector3f(20, -20, 1), new Vector2f(1, 1)),
|
||||||
new Vertex(new Vector3f(20, 20, 0), new Vector2f(1, 0)),
|
new Vertex(new Vector3f(20, 20, 1), new Vector2f(1, 0)),
|
||||||
}, new int[] {
|
}, new int[] {
|
||||||
0, 1, 3,
|
0, 1, 3,
|
||||||
3, 1, 2
|
3, 1, 2
|
||||||
|
|
||||||
}, new Material(new Texture("resources/textures/plane.png")));
|
}, new Material(new Texture("resources/textures/thonk.png")));
|
||||||
|
|
||||||
public Mesh mesh = new Mesh(new Vertex[] {
|
public Mesh mesh = new Mesh(new Vertex[] {
|
||||||
//Back face
|
//Back face
|
||||||
|
@ -135,6 +135,7 @@ public class Test extends Game {
|
||||||
|
|
||||||
// rendering the mesh
|
// rendering the mesh
|
||||||
renderer.renderMesh(testObject, camera);
|
renderer.renderMesh(testObject, camera);
|
||||||
|
renderer.renderMesh(testingPlane, camera);
|
||||||
//swap buffers so the new one will appear
|
//swap buffers so the new one will appear
|
||||||
display.swapBuffers();
|
display.swapBuffers();
|
||||||
}
|
}
|
||||||
|
@ -175,6 +176,7 @@ public class Test extends Game {
|
||||||
display.destroy();
|
display.destroy();
|
||||||
mesh.destroy();
|
mesh.destroy();
|
||||||
shader.destroy();
|
shader.destroy();
|
||||||
|
plane.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
Reference in New Issue
Block a user