1 module prova.graphics.shapes.quadmesh;
2 
3 import prova.graphics,
4        prova.math;
5 
6 ///
7 class QuadMesh : Mesh
8 {
9   ///
10   this(float width, float height)
11   {
12     float halfWidth = width / 2;
13     float halfHeight = height / 2;
14     float[] vertices = [
15       -halfWidth, -halfHeight, 
16       halfWidth, -halfHeight,
17       halfWidth, halfHeight,
18       -halfWidth, halfHeight
19     ];
20 
21     uint[] indexes = [0, 1, 2, 0, 2, 3];
22 
23     setVBO(vertices, 2);
24     setIBO(indexes);
25   }
26 }