I don't think you have looked at his code at all :P.
The problem there is something that should be done during initialization is done every frame: unpacking a texture one pixel at a time, making a new texture and removing old textures from TextureManager will not result in good fps. Saving memory here is not an issue, because the whole BufferedImage is loaded into the memory (and copied every frame). In fact, buffering textures during initialization and letting that buffered image go will save memory and memory bandwidth.
No, there’s not enough time in the day to read through all of the code that is posted here anymore. Ah well… I’ll just resist the urge to post [next time]
to renanse:
I don't think you have looked at his code at all :P.
An unneccessary and offensive statement. Renanse's solution is "a quick hack", just as he says in his post. Your approach, lex, is "an easy solution" instead, which isn't that much a difference really. I am very happy to have a bit of insight from the core developers in almost every thread on this forum, and I wouldn't want to lose that because sometimes those answers don't solve the OPs problem in the "best possible" way.
Back on topic:
Depending on the situation the animated texture is presented in the "best possible way" might also be any of the following:
to use a big texture containing all frames of the animation - and only change texture coordinates in the render/update loop
to use a pixel shader solution
to use one of the video texture solutions that are somewhere on the forum
to renanse:
I don't think you have looked at his code at all Tongue.
An unneccessary and offensive statement.
There is nothing offensive about it... I have said more offensive things :)
I might not have ideal people skills because I call things what they are and I don't brown nose, so please forgive me.
Before anyone gets angry at anyone else I figured I'd step in and tell you all to shut up.
Any post on just about any forum has to be taken pretty light-hearted or it will all turn into flame wars…as appealing as that sounds to me I don't think anyone intended any harm…except me of course by my "shut up" comment.