fullscreen - SDL - (Hardware) Pixel Scaling -


in sdl game, i'd retain fixed resolution of game area, both gameplay , performance reasons.

what wanted have small resolution (e.g. 320 * 240), , when resizing window / switching fullscreen mode letting sdl / graphics card scale each pixel.

however problems occur are:

  • the rendered picture gets 'blurry'
  • the actual drawing area smaller screen, there black regions on top, bottom left , right

what can solve this?

i have seen work in other games before

use stretch functions sdl stretch-blit surface, or upload surface opengl texture each frame , render appropriately-sized quad.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -