Hello all.
Is there any extensive tutorial on how to load images and display them on screen with JOGL?
I’ve searched the forums but didn’t find any dedicated guide to displaying images.
Thanks for the help.
Hello all.
Is there any extensive tutorial on how to load images and display them on screen with JOGL?
I’ve searched the forums but didn’t find any dedicated guide to displaying images.
Thanks for the help.
A popular tutorial site for this, and other OpenGL tasks, is called NeHe and can be found here: http://nehe.gamedev.net/
An alternative which is a part of JOGL’s util classes, is the Texture package (com.sun.opengl.util.texture), particularly, the TextureIO class. With that, it can create a Texture from several popular image formats for you to use.
Well, I am using the code from http://www.cs.plu.edu/~dwolff/talks/jogl-ccsc/src/f_Textures/TextureLoader.java and it works quite well ;).
I am using NeHe’s tutorials but the code used to load and display textures is from the site above.
The TextureIO class loads textures, but they come out blurred, even with the demo supplied in the JOGL demo library, so I prefer the code above.
The textures can come-out blurry if you’ve specified mipmapping when you ask the TextureIO class to generate a texture. Try telling it to not make mipmaps.