If you want, I can spend some hours tonight in improving your code but please can you mention an open source license in the header of the file?
The improvements I suggest are these furthers:
- create a single NIO buffer, recreate it if and only if a NIO buffer with a different size is needed (currently, you create a NIO buffer at each frame :s )
- use a direct NIO buffer, add the comment to encourage the developer to release the native resources by using a known solution
- don't use an array, use directly the NIO buffer
- support the other formats
- create a single texture data object, recreate it if and only if a texture data object with a different size is needed