Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. package main;
  2.  
  3. import java.io.File;
  4.  
  5. import com.jogamp.opengl.GL;
  6. import com.jogamp.opengl.util.texture.Texture;
  7. import com.jogamp.opengl.util.texture.TextureIO;
  8.  
  9. public class TextureLoader {
  10. public static Texture load(String fileName) {
  11. Texture text = null;
  12. try {
  13. text = TextureIO.newTexture(new File(fileName), false);
  14. } catch (Exception e) {
  15. System.out.println(e.getMessage());
  16. System.out.println(fileName);
  17. }
  18. return text;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement