Skip to content

Conversation

@nezvers
Copy link
Contributor

@nezvers nezvers commented Oct 28, 2025

Created an example for scaling a viewport RenderTexture in different modes:
Upscaling for pixel art and Lowrezjams

  • Keep aspect integer
  • Keep height integer
  • Keep width integer
    Upscale and downscale (4K example included)
  • Keep aspect
  • Keep height
  • Keep width

Example include couple preset viewport resolutions.
Modes and resolutions are switchable with gui buttons.
For example I included position on texture calculation with a circle following mouse.

I couldn't figure out how to use rexm yet, I'll try to get it working on next example. I did example adding manually without couple last checkpoints.

@raysan5 raysan5 changed the title example - core_viewport_scaling [examples] Added core_viewport_scaling Oct 29, 2025
@raysan5
Copy link
Owner

raysan5 commented Oct 29, 2025

@nezvers Thanks! Looks great! Please, could you review code to follow raylib code conventions?

Also, code structure should follow this format: https://github.com/raysan5/raylib/blob/master/examples/text/text_unicode_ranges.c

With the section headers, functions declared before main() but defined after main, static symbols...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants