Yesterday I’ve done a few changes to the TextureLoader. Please have a look at and check them.
You can see, what I’ve changed when you checkout and synchronize, but to sum it up for short:
There was a “self made” buffering mechanism in the stream loader. It first loaded them into a byte array and resized the array every time it becomes greater than the current avalable size. Well, this is unnecessary, since the next step was to create a ByteArrayInputStream to read from the byte array. I’ve just shorten the way and let this second step read directly from the input stream (well I’ve inserted a BufferedInputStream inbetween).
Further, if a TextureStreamLoader begins to read the first bytes of the stream and decides that the current stream doesn’t contain data loadable by this loader, it returned null, but didn’t reset the stream. I’ve changed this.
The loadTexture method of the TextureStreamLoader didn’t receive the format and mipmap flags as parameters. At least in the TextureStreamLoaderTGA, which I newly added, I needed these parameters. So I added them to the interface, which won’t do any harm to the others.
Marvin