How do I load texture array in jogl?
Posted by Steyrix on Aug 11, 2018; 12:15pm
URL: https://forum.jogamp.org/How-do-I-load-texture-array-in-jogl-tp4039107.html
Hello, everyone.
I have been trying to load texture array in my jogl app using gl functions like
glTexStorage3D, glTexSubImage3D.
I use PNG texture.
The texture I loaded has wrong colors due to Java's ARGB. I tried converting images data bytes from ARGB
to RGBA manually and didn't succeed (the texture became invisible since I discard every fragment which has alpha <= 0 in my fragment shader)
However, I know that JOGL provides such class as TextureIO, which makes texture loading easy
and also takes care about right coloring.
I wonder if there's any way to load texture array as easy as I do load a single texture using TextureIO.
And if there is not, how can I load texture array by myself properly?