jeu-de-combat/src/engine/object/ObjectGlTexColor.java
2021-05-20 20:55:51 +02:00

23 lines
775 B
Java

package engine.object;
import engine.graphics.Shader;
import engine.graphics.VertexArray;
import engine.math.Primitive;
import engine.math.Matrix4f;
import java.util.List;
public class ObjectGlTexColor extends ObjectGlTex{
public ObjectGlTexColor(float x, float y, float z, float h, float w, List<String> texPath, float[] texCoord, float[] color) {
super();
this.vertexArray = new VertexArray(Primitive.createRectangle(x, y, z, h, w), Primitive.rectangle_indices, color, texCoord);
this.transform = Matrix4f.identity();
this.shader = new Shader("shaders/ObjectGlTexColor/vert.glsl","shaders/ObjectGlTexColor/frag.glsl");
this.zPos = z;
this.width = w;
this.height = h;
this.setTexture(texPath);
}
}