Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.io.File;
- import com.jogamp.opengl.GL;
- import com.jogamp.opengl.util.texture.Texture;
- import com.jogamp.opengl.util.texture.TextureIO;
- public class TextureLoader {
- public static Texture load(String fileName) {
- Texture text = null;
- try {
- text = TextureIO.newTexture(new File(fileName), false);
- } catch (Exception e) {
- System.out.println(e.getMessage());
- System.out.println(fileName);
- }
- return text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement