Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
Viewport Macros

Macros

#define VIEWPORT_WIDTH   960
 
#define VIEWPORT_HEIGHT   640
 
#define VIEWPORT_X_OFFSET   10
 
#define VIEWPORT_Y_OFFSET   10
 

Detailed Description

These macros define the size and the position of the viewport. The viewport is the picture captured by the camera.

Note
Is good for the viewport size to satisfy WIDTH = HEIGHT * 1.5, and also for the numbers to be divisible by powers of 2

Macro Definition Documentation

◆ VIEWPORT_HEIGHT

#define VIEWPORT_HEIGHT   640

The height of the picture captured byt the camera

◆ VIEWPORT_WIDTH

#define VIEWPORT_WIDTH   960

The width of the picture captured byt the camera

◆ VIEWPORT_X_OFFSET

#define VIEWPORT_X_OFFSET   10

The horizontal offset of the picture captured byt the camera from the top-left corner

◆ VIEWPORT_Y_OFFSET

#define VIEWPORT_Y_OFFSET   10

The vertical offset of the picture captured byt the camera from the top-left corner