Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
window_manager.h File Reference

Go to the source code of this file.

Macros

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

Functions

void create_window (const char *title, const int width, const int height)
 
void update_window (void)
 
void swap_window_buffers (void)
 
void destroy_window (void)
 

Function Documentation

◆ create_window()

void create_window ( const char *  title,
const int  width,
const int  height 
)

Creates the window and the context for OpenGL

Parameters
titleThe title of the window, it'll show up in the upper section of the window
widthThe window width in pixels
heightThe window height in pixels

◆ destroy_window()

void destroy_window ( void  )

Calls every deleter function for the graphical stuff

◆ swap_window_buffers()

void swap_window_buffers ( void  )

Swaps the current frame with the one rendered, call it every time at the end of the main loop (when everything has been drawn)

◆ update_window()

void update_window ( void  )

Clears the previous frame and renders the next frame