Skip to main content
12 events
when toggle format what by license comment
S Sep 2 at 18:26 history suggested LudoProf CC BY-SA 4.0
Don't repeat tags in title
Sep 1 at 16:43 comment added DMGregory @tp1 that's not exactly what that function does.glViewport sets the portion of the window that will be drawn into, so it can help with doing things like letterboxing, but it doesn't itself handle scaling the game to work on different screen/window resolutions while maintaining crispness.
Sep 1 at 1:23 comment added tp1 opengl has glViewport() which allows resizing the screen.
Aug 31 at 21:05 review Suggested edits
S Sep 2 at 18:26
Aug 31 at 8:34 comment added DMGregory No, if you want maximum crispness, you'll match the back buffer resolution to the actual output destination. We'll only use a smaller back buffer in two cases: reducing rendering load to trade fidelity for better performance/framerate, or emulating a retro-style chunky pixel aesthetic. A render scale factor works, though in many engines/frameworks this will be implicit in the notion of a "camera" and a camera transformation that maps from a consistent world coordinate system to rendering coords. I can't speak to how it's normally done with SDL specifically, though — hopefully an answer will.
Aug 31 at 1:52 comment added NewCoder Thanks for the suggestion! SDFs seem like a great method for a potential future project. Sorry for the confusion in my original wording — I’ve clarified the question. I’m mainly asking about scaling games with crisp raster images/sprites to different sized monitors (like in Geometry Dash or Hollow Knight): is that usually done with a fixed sized back buffer that is then scaled, per-sprite scaling, or another common method?
Aug 31 at 1:45 history edited NewCoder CC BY-SA 4.0
added 9 characters in body
Aug 31 at 0:33 history edited NewCoder CC BY-SA 4.0
edited title
Aug 29 at 0:09 comment added DMGregory Have you looked into Signed Distance Fields (SDF)? They're a way to render vector-like graphics that maintain crisper, smoother edges over a wider range of scales and transformations than traditional raster sprites. They're popular for text rendering, but they work for other cases where you want a complex solid or stroked shape drawn in a plain colour or gradients without surface texture. I have a previous answer demoing the technique / showing the difference in rendered visuals here and you can find lots more by searching those keywords.
Aug 29 at 0:06 history edited DMGregory CC BY-SA 4.0
Don't repeat tags in title
S Aug 28 at 22:03 review First questions
Sep 2 at 18:30
S Aug 28 at 22:03 history asked NewCoder CC BY-SA 4.0