1. Michael Ludwig
  2. ferox

Commits

Michael Ludwig  committed a4d76c9

Change winding on Rectangle

  • Participants
  • Parent commits 27c24ba
  • Branches default

Comments (0)

Files changed (1)

File ferox-renderer/ferox-renderer-api/src/main/java/com/ferox/util/geom/Rectangle.java

View file
 
             va[i++] = 0f;
             va[i++] = 0f;
+            
+            // lower-right
+            va[i++] = (float) (xAxis.x * right + yAxis.x * bottom);
+            va[i++] = (float) (xAxis.y * right + yAxis.y * bottom);
+            va[i++] = (float) (xAxis.z * right + yAxis.z * bottom);
 
+            va[i++] = (float) normal.x;
+            va[i++] = (float) normal.y;
+            va[i++] = (float) normal.z;
+
+            va[i++] = 1f;
+            va[i++] = 0f;
+
+            // upper-right
+            va[i++] = (float) (xAxis.x * right + yAxis.x * top);
+            va[i++] = (float) (xAxis.y * right + yAxis.y * top);
+            va[i++] = (float) (xAxis.z * right + yAxis.z * top);
+
+            va[i++] = (float) normal.x;
+            va[i++] = (float) normal.y;
+            va[i++] = (float) normal.z;
+
+            va[i++] = 1f;
+            va[i++] = 1f;
+            
             // upper-left
             va[i++] = (float) (xAxis.x * left + yAxis.x * top);
             va[i++] = (float) (xAxis.y * left + yAxis.y * top);
             va[i++] = 0f;
             va[i++] = 1f;
 
-            // upper-right
-            va[i++] = (float) (xAxis.x * right + yAxis.x * top);
-            va[i++] = (float) (xAxis.y * right + yAxis.y * top);
-            va[i++] = (float) (xAxis.z * right + yAxis.z * top);
-
-            va[i++] = (float) normal.x;
-            va[i++] = (float) normal.y;
-            va[i++] = (float) normal.z;
-
-            va[i++] = 1f;
-            va[i++] = 1f;
-
-            // lower-right
-            va[i++] = (float) (xAxis.x * right + yAxis.x * bottom);
-            va[i++] = (float) (xAxis.y * right + yAxis.y * bottom);
-            va[i++] = (float) (xAxis.z * right + yAxis.z * bottom);
-
-            va[i++] = (float) normal.x;
-            va[i++] = (float) normal.y;
-            va[i++] = (float) normal.z;
-
-            va[i++] = 1f;
-            va[i++] = 0f;
-
             vertexAttributes = new VertexBufferObject(new BufferData(va), mode);
             vertices = new VertexAttribute(vertexAttributes, 3, 0, 5);
             normals = new VertexAttribute(vertexAttributes, 3, 3, 5);