You are using width=size[0] and height=size[1] which is probably fine, but then you are telling OpenGL that the depth=index.
Ah so I'm misinterpreting that third size component? The way I understood it, it refers to the index of the given sprite in the texture array. But when I read
the documentation again, it seems to refer to the total amount of sprites that you are trying to load, is this correct? So to be fully clear, my line would have to look as follows
GL45.glTextureSubImage3D(ID(), lod, 0, 0, index, size[0], size[1], 1, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, data);
As an aside, I'm assuming this also means you can load multiple sprites through one call, and appropriately changing that '1' into however many sprites are stored in your data buffer? How would this data then have to be laid out? I assume the sprites cannot be interleaved, they would have to be stored in the buffer sequentially?