mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 06:13:10 +00:00
explained a bit more the core_window_letterbox example (#925)
This commit is contained in:
parent
f81cb1a252
commit
68ffbc06c7
@ -29,7 +29,7 @@ int main(void)
|
|||||||
int gameScreenWidth = 640;
|
int gameScreenWidth = 640;
|
||||||
int gameScreenHeight = 480;
|
int gameScreenHeight = 480;
|
||||||
|
|
||||||
// Render texture initialization
|
// Render texture initialization, used to hold the rendering result so we can easily resize it
|
||||||
RenderTexture2D target = LoadRenderTexture(gameScreenWidth, gameScreenHeight);
|
RenderTexture2D target = LoadRenderTexture(gameScreenWidth, gameScreenHeight);
|
||||||
SetTextureFilter(target.texture, FILTER_BILINEAR); // Texture scale filter to use
|
SetTextureFilter(target.texture, FILTER_BILINEAR); // Texture scale filter to use
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ int main(void)
|
|||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
// Draw everything in the render texture
|
// Draw everything in the render texture, note this will not be rendered on screen, yet
|
||||||
BeginTextureMode(target);
|
BeginTextureMode(target);
|
||||||
|
|
||||||
ClearBackground(RAYWHITE); // Clear render texture background color
|
ClearBackground(RAYWHITE); // Clear render texture background color
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user