Seems that whenever you create a new image in slick that has no texture, setting its filter throws an exception that complains about the resource not being found. I am trying to double buffer something. Any thoughts as to how to apply a filter to a buffer image?
I’m sorry, I have no answer for your question.
And I know those questions are often somehow contra-productive, but:
Why are you trying to double buffer something in OpenGL? OpenGL’s framebuffers in LWJGL are ALL doublebuffered.
I’m trying to avoid visual artifacts. I either have to settle for making my tiles 32x32, or 64x64. 32x32 is too small, and 64x64 is too big, so I want to scale the entire screen down by about 30%. Well, TiledMaps generally don’t scale well, so I decided to buffer all the content to an offscreen buffer, then scale the buffer.
Creating a Slick image with no texture should not be possible; it will likely throw a null pointer since Texture is expected to be non-null.
For offscreen buffers where you plan to use getGraphics, you should use the new Image.createOffscreenImage utility and specify a filter there.
I don’t understand why you don’t just use non-power-of-two tiles, e.g. 45x45. ???
P.S. In future, always post the exception.
Also the artifacts are propably only because you didn’t create mipmaps or you didn’t enable antialiasing.
Non power of two tiles don’t fit quite as well on my sprite sheets… Well, that WOULD solve my problem, but let me play the devil’s advocate for a moment. What would be the best course of action if I wanted my game’s camera to zoom in and out occasionally?
Edit: Before I forget, I would like to point out that I’ve never been able to download a copy of slick that has the method createOffscreenImage() located in the Image class. Am I perhaps downloading the incorrect distribution? I always try to find the latest, but I can’t seem to find one with that method. I only every see it in examples.
You probably talk about Bleeding, I made a thread once: http://www.java-gaming.org/topics/bleeding/26823/view.html
There are things you can do, but its all… not that straightforward… well unless you just use NEAREST filter and screw the quality