I can't find a solution for "The type org.newdawn.slick.opengl.Texture is not accessible"

279 Views Asked by At

I'm trying to learn how to make a 3d game engine in java following the tutorials from ThinMatrix (loving them so far). The problem is that one of the libraries from slick-utils seems to be missing? or corrupted? or not supported? I don't really know and I'm a total begginer in LWJGL, OpenGL and big java projects. I searched the error and nothing seems to work or the solutions are too problem specific, ie. related to an error in the coding rather than in the libraries.

There's not much code to show, I add the import in the class and the IDE prompts me with the error on the title: "The type org.newdawn.slick.opengl.Texture is not accessible".

On the comments of the video there was a "solution" that seems to have worked for at least 5 people, but for some reason it doesn't work for me. The problem in the solution code (that avoids using slick-utils) is that there's a MemoryStack class that I can't seem to find anywhere, I serached the text that the IDE prompts me but it was fruitless...

This is what I searched for: "MemoryStack cannot be resolved", and for the life of me I can't find how to import, resolve, or do anything, really.

I'm really frustrated and google isn't my friend today, it seems.

I think there may be a problem with the LWJGL libraries that I'm using (I don't remember if I'm using LWJGL2 or 3, I believe 2 because the tutorials are from 2014 and 3 didn't exist yet? Idk), but I can't figure out what's the problem and all the hints that the IDE trows at me are leading me to flat out dead ends.

Thanks so much for reading, and helping me if you can! I can show the code but I don't think it matters that much, as the problem seems to come from the slick-utils library being corrupted or something, or that I don't understand how to add it properly to my project.

This should be the minimum reproducible example: import org.newdawn.slick.opengl.Texture;

This is the first question I make so feel free to tell me if I'm missing something or whatever! :)

1

There are 1 best solutions below

1
David M. Karr On

It's often the case that googling specific parts of a new error message will find other people who have had the same problem. When I google that class name, I find someone who had the exact same problem that you did, many years ago. The thread shows where to find the library which has that class.

https://gamedev.stackexchange.com/questions/35047/where-can-i-find-the-library-for-org-newdawn-slick-opengl-texture