|
Aegis2D
Modular C++26 2D game engine for networked games
|
The game's screen at a fixed size, whatever the window's. More...
#include <aegis2d/render/letterbox.hpp>
Public Attributes | |
| Vec2 | size {1280.0F, 720.0F} |
| Width and height in logical pixels, such as 1280 x 720. | |
| ScaleMode | mode = ScaleMode::Fit |
| How the screen is scaled. | |
| Color | bars {.r = 0.0F, .g = 0.0F, .b = 0.0F, .a = 1.0F} |
| Color of the bars around the screen. | |
The game's screen at a fixed size, whatever the window's.
The game draws in logical pixels, from (0, 0) to size; the renderer scales that screen to the window, keeping its aspect ratio, centers it and fills the rest with bars, above and below or on the sides. Resizing the window changes neither the layout nor the proportions.
| Color aegis2d::render::LogicalScreen::bars {.r = 0.0F, .g = 0.0F, .b = 0.0F, .a = 1.0F} |
Color of the bars around the screen.
| ScaleMode aegis2d::render::LogicalScreen::mode = ScaleMode::Fit |
How the screen is scaled.
| Vec2 aegis2d::render::LogicalScreen::size {1280.0F, 720.0F} |
Width and height in logical pixels, such as 1280 x 720.