swapTexWrap added
This commit is contained in:
@ -6,20 +6,30 @@ public class Primitive {
|
||||
|
||||
public static float[] createRectangle(float x, float y, float z, float w, float h){
|
||||
return new float[] {
|
||||
x , y , z,
|
||||
x + w, y , z,
|
||||
x + w, y - h, z,
|
||||
x , y - h, z
|
||||
x , y , z, // Haut gauche
|
||||
x + w, y , z, // Haut droit
|
||||
x + w, y - h, z, // Bas droit
|
||||
x , y - h, z // Bas gauche
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Chaque point correspond à un vertex de la primite le reste est interpolé
|
||||
*/
|
||||
public static float[] stdTexWrap = new float[] {
|
||||
1.0f, 1.0f,
|
||||
1.0f, 0.0f,
|
||||
0.0f, 0.0f,
|
||||
1.0f, 0.0f,
|
||||
1.0f, 1.0f,
|
||||
0.0f, 1.0f
|
||||
};
|
||||
|
||||
public static float[] upperHalfTexWrap = new float[] {
|
||||
0.0f, 0.0f,
|
||||
1.0f, 0.0f,
|
||||
1.0f, 0.5f,
|
||||
0.0f, 0.5f
|
||||
};
|
||||
|
||||
public static byte[] rectangle_indices = new byte[] {
|
||||
0, 1, 3,
|
||||
1, 2, 3
|
||||
|
Reference in New Issue
Block a user