Original Post
I came across a bug in my current 2D engine regarding scaling to different resolutions. Although the bug isn''t serious it did get me wondering about other ways to handle scaling. I see two main options:
1) Pass all translation/rendering calls through wrapper functions that multiply the coordinates according to the base supported screen resolution.
2) Render to a texture of a given size and and draw that texture onto the screen using the gpu to scale it up/down as needed.
I''m wondering which would likely provide the fastest results. Method one requires an average of 2 floating point calculations per vertex. When you consider the thousands of vertices that can make up a complex display then it could get quite processor intensive. Method two requires no such calculations on the cpu, but does require a complete redraw of the screen every frame on top of normal drawing operations. Also, some older cards don''t have very good support for rendering to textures.
At the moment I''m using method 1, but would you guys recommend 2 as the better option or not?