how to zoom in sdl2?

I’m sure this works great in many situations but it sounds like it would sometimes lead to a lot of unnecessary rendering. If you have a large game world it might be too slow to render everything each frame. And you might not want to just enlarge the pixels of your target texture, instead you might want to still get sharp lines without blur or visible pixels. When zoomed in you might even want to draw additional details or switch to more high-res graphics.

Using an intermediate texture is great for low-res games that you want to upscale. It can give you better consistency and avoid “rounding errors” that could otherwise cause graphical glitches with non-integer scaling factors (this can be especially noticeable with tile maps) but I consider this to be separate from “zooming”.

1 Like