setTexture added

This commit is contained in:
Antoine
2021-05-20 18:02:24 +02:00
parent 282a8b0283
commit 859344b131
3 changed files with 28 additions and 40 deletions

View File

@ -23,7 +23,10 @@ public class ObjectGlTex extends ObjectGl{
this.transform = Matrix4f.identity();
this.shader = new Shader("shaders/ObjectGlTex/vert.glsl","shaders/ObjectGlTex/frag.glsl");
this.zPos = z;
this.setTexture(texPath);
}
public void setTexture(List<String> texPath){
this.textures = new ArrayList<>();
int count = 0;
for (String path : texPath){

View File

@ -17,12 +17,6 @@ public class ObjectGlTexColor extends ObjectGlTex{
this.transform = Matrix4f.identity();
this.shader = new Shader("shaders/ObjectGlTexColor/vert.glsl","shaders/ObjectGlTexColor/frag.glsl");
this.zPos = z;
this.textures = new ArrayList<>();
int count = 0;
for (String path : texPath){
textures.add(new Texture(path, count));
count++;
}
this.setTexture(texPath);
}
}