VSGL2 - Very Simple Graphic Library 2  2.0
 All Classes Namespaces Files Functions Variables Macros Pages
Functions | Variables
vsgl2::general Namespace Reference

Functions

void init ()
 Use this function to initiate the library, must be called first. More...
 
void close ()
 Close and free all the resources, must be called last. More...
 
void set_window (int w, int h, string title, int fullscreen=0)
 Use this function to create a window with the specified dimensions and a title, optionally in full screen. More...
 
void set_background_color (const Color &bg)
 Use this function to change the background color. More...
 
int get_window_width ()
 Use this function to get the width of the current window. More...
 
int get_window_height ()
 Use this function to get the height of the current window. More...
 

Variables

const int FULLSCREEN = SDL_WINDOW_FULLSCREEN
 

Function Documentation

void close ( )

Close and free all the resources, must be called last.

int get_window_height ( )

Use this function to get the height of the current window.

Returns
The height of the current window
int get_window_width ( )

Use this function to get the width of the current window.

Returns
The width of the current window
void init ( )

Use this function to initiate the library, must be called first.

void set_background_color ( const Color bg)

Use this function to change the background color.

Parameters
bgThe new background color
Warning
The alpha channel has to be configured, but it is not used
void set_window ( int  w,
int  h,
string  title,
int  fullscreen = 0 
)

Use this function to create a window with the specified dimensions and a title, optionally in full screen.

Parameters
wthe width of the window, in screen coordinates
hthe height of the window, in screen coordinates
titlethe title of the window
fullscreenFlag to set the application to fullscreen mode (fullscreen = 1) or windowed (fullscreen = 0)

Variable Documentation

const int FULLSCREEN = SDL_WINDOW_FULLSCREEN