在openGL中找不到用于纹理创建的java文件路径
我目前正在尝试使用JOGL创建一个带纹理的多边形,我想我已经准备好了。但是,当我尝试将png图像加载到TextureReader时,它告诉我找不到该文件。程序和图像都位于名为“视频”的项目中
texture = genTexture(gl);
gl.glBindTexture(GL.GL_TEXTURE_2D, texture);
TextureReader.Texture texture = null;
try {
texture = TextureReader.readTexture("Videos/boy_reaching_up_for_goalpost_stencil.png");
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
共 (0) 个答案