Hi there! After a long night of trying to figure this out I've decided to ask for help here.
I am in the process of learning LWJGL, and to load an image, almost all sites and guides told me to use the stb library. So I did. And I'm getting an access violation. Here is my code
IntBuffer x,y,n;
x = IntBuffer.allocate(1);
y = IntBuffer.allocate(1);
n = IntBuffer.allocate(1);
ByteBuffer testooo;
try{
testooo = stbi_load("./resources/Hammer.png", x, y, n, 0);
System.out.println(stbi_failure_reason());
}catch (Exception e) {
e.printStackTrace();
}
I have a folder "resources" in my buildpath, and it contains the image "Hammer.png".
(The class "Texturetest.java" is not used in the program)
If I change the image path to a non-existant file or location, it does not give an error and stbi_failure_reason() simply says "Unable to open file".
Here is a link to the pastebin containing the error and the log that was created for the error:
http://pastebin.com/Ui5AC4v7Thank you in advance.