Consolidate all resources to the IntelliJ resources folder.
This commit is contained in:
parent
ea6b9266d9
commit
701165c012
4 changed files with 3 additions and 3 deletions
|
@ -153,9 +153,9 @@ public class ObjectLoader {
|
||||||
IntBuffer h = stack.mallocInt(1);
|
IntBuffer h = stack.mallocInt(1);
|
||||||
IntBuffer c = stack.mallocInt(1);
|
IntBuffer c = stack.mallocInt(1);
|
||||||
|
|
||||||
buffer = STBImage.stbi_load(fileName, w, h, c, 4);
|
buffer = STBImage.stbi_load(ObjectLoader.class.getResource(fileName).getFile(), w, h, c, 4);
|
||||||
if (buffer == null)
|
if (buffer == null)
|
||||||
throw new Exception("Image File " + fileName + " not loaded " + STBImage.stbi_failure_reason());
|
throw new Exception("Image File: '" + fileName + "' not loaded, error: " + STBImage.stbi_failure_reason());
|
||||||
|
|
||||||
width = w.get();
|
width = w.get();
|
||||||
height = h.get();
|
height = h.get();
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class TestGame implements ILogic {
|
||||||
renderer.init();
|
renderer.init();
|
||||||
|
|
||||||
Model model = loader.loadOBJModel("/models/cube.obj");
|
Model model = loader.loadOBJModel("/models/cube.obj");
|
||||||
model.setTexture(new Texture(loader.loadTexture("res/textures/grassblock.jpg")));
|
model.setTexture(new Texture(loader.loadTexture("/textures/grassblock.jpg")));
|
||||||
|
|
||||||
entity = new Entity(model, new Vector3f(0, 0, -5), new Vector3f(0, 0, 0), 1);
|
entity = new Entity(model, new Vector3f(0, 0, -5), new Vector3f(0, 0, 0), 1);
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.1 MiB |
Loading…
Add table
Add a link
Reference in a new issue