Fix small inconsistencies.
This commit is contained in:
parent
c5972b9dd2
commit
ec65375271
4 changed files with 2 additions and 2 deletions
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.1 MiB |
|
@ -50,6 +50,7 @@ public class ObjectLoader {
|
||||||
int id = GL11.glGenTextures();
|
int id = GL11.glGenTextures();
|
||||||
|
|
||||||
textures.add(id);
|
textures.add(id);
|
||||||
|
|
||||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, id);
|
GL11.glBindTexture(GL11.GL_TEXTURE_2D, id);
|
||||||
GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);
|
GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);
|
||||||
GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
|
GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, width, height, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.okseby.core.entity;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
public class Texture {
|
public class Texture {
|
||||||
|
|
||||||
@Getter private final int id;
|
@Getter private final int id;
|
||||||
|
|
||||||
public Texture(int id) {
|
public Texture(int id) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class TestGame implements ILogic {
|
||||||
};
|
};
|
||||||
|
|
||||||
model = loader.loadModel(vertices, textureCoordinates, indices);
|
model = loader.loadModel(vertices, textureCoordinates, indices);
|
||||||
model.setTexture(new Texture(loader.loadTexture("textures/grassblock.png")));
|
model.setTexture(new Texture(loader.loadTexture("res/textures/grassblock.png")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue