I'm trying to blit a full-screen image using draw2DImage. I'm using non-power-of-2 screen size and texture size. However, it still doesn't draw 1-to-1; I think it resizes it down to a power of 2, and then upsamples it to fit the window. I've been doing a lot of work with Irrlicht over the past two months, and this just seems to be a limitation of the drivers. I've done a lot of searching on the forums, and can't find anyone who's had success with that. Can you "correctly" draw an image of a non-power-of-2 texture?
Original image:
Image in Irrlicht:
If not, I'm willing to compromise with a filtered image. However, I've been unable to figure out how to turn on bi/trilinear filtering for the draw2DImage function. I've tried
Yeah irrlicht will upscale a NPOT image to the nearest POT dimension. I thought maybe it didn't do it if the graphics card supported NPOT textures, but maybe it just does it as standard. And really you can't just rely on your gfx supporting NPOT textures as your users may not have a gfx card that also supports NPOT textures.
What you can do though is just make your texture POT dimensions, by using padding around the edges and then draw just the necessary rectangle, ignoring the padding.
Okay, great JP. This solution works well. Thanks! I've made my texture a POT texture and used a clip rectangle that is 1-to-1 with the screen.
Now the only other thing I'm wondering is if we can get it to display well on resolutions other than 1-to-1 imageclip:window resolutions (i.e. requiring an image scale). Here is where I'd want to turn on texture filtering, but as I said I'm not sure if what I've tried is working (turning it on and off seems to have no effect on the image).
Is there an already established way to work around the problem of displaying scaled images? And how can I turn on filtering of textures so that scales look better?