ObjectGlTex & ObjectGlTexColor now working :o)

This commit is contained in:
Antoine
2021-05-19 15:00:12 +02:00
parent 7f491ad597
commit 57b6be084d
8 changed files with 26 additions and 82 deletions

View File

@ -6,6 +6,7 @@ import engine.graphics.Texture;
import engine.graphics.VertexArray;
import engine.math.Matrix4f;
import java.util.ArrayList;
import java.util.List;
public class ObjectGlTex extends ObjectGl{
@ -22,6 +23,7 @@ public class ObjectGlTex extends ObjectGl{
this.transform = Matrix4f.identity();
this.shader = new Shader("shaders/ObjectGlTex/vert.glsl","shaders/ObjectGlTex/frag.glsl");
this.textures = new ArrayList<>();
int count = 0;
for (String path : texPath){
textures.add(new Texture(path, count));

View File

@ -6,6 +6,7 @@ import engine.graphics.Shader;
import engine.graphics.VertexArray;
import engine.math.Matrix4f;
import java.util.ArrayList;
import java.util.List;
public class ObjectGlTexColor extends ObjectGlTex{
@ -16,6 +17,7 @@ public class ObjectGlTexColor extends ObjectGlTex{
this.transform = Matrix4f.identity();
this.shader = new Shader("shaders/ObjectGlTexColor/vert.glsl","shaders/ObjectGlTexColor/frag.glsl");
this.textures = new ArrayList<>();
int count = 0;
for (String path : texPath){
textures.add(new Texture(path, count));