-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.rlViewport
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Set the viewport area (transformation from normalized device coordinates to window coordinates)
| Parameter | Default Value | Note |
|---|---|---|
| x | ||
| y | ||
| width | ||
| height |
None.
// Draw to the left half of the screen
raylib.rlViewport 0, 0, 400, 600
// Draw to the right half of the screen
raylib.rlViewport 400, 0, 400, 600
// Restore full viewport
raylib.rlViewport 0, 0, 800, 600