bi = ImageIO.read(new File(filename));
width = bi.getWidth();
height = bi.getHeight();
ByteBuffer data = stbi_load("/sprites/" + filename, width, height, 0, 0);
出于某种原因,stbi_load
不接受方法中的第二个、第三个和第四个参数,即使它们都是有效的整数。它给出了以下错误
The method stbi_load(ByteBuffer, IntBuffer, IntBuffer, IntBuffer, int) in the type STBImage is not applicable for the arguments (String, int, int, int, int).
任何想法为什么会发生这种情况?任何答案表示赞赏