LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
|
Functions | |
int | lg_draw_bg (int mode, int param_x, int param_y, const char *path) |
void | lg_clear_bg (uint8_t red, uint8_t green, uint8_t blue) |
void | lg_clear_bg_full (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha, GLbitfield mask) |
void | lg_bg_info () |
int | lg_read_and_render_screen_back () |
=== Draw background, and these sorts of things ===
int lg_draw_bg | ( | int | mode, |
int | param_x, | ||
int | param_y, | ||
const char * | path | ||
) |
Draw (full or windowed) background - load (once) or draw or free
=== ONLY ONE INSTANCE at a time ===
Should be able to handle, at least, TWO INSTANCES -> bg = lg_bg_new(), lg_bg_draw(), ...
Would be convenient to be able to zoom in LG_ON mode
mode | LG_NEW or LG_ON |
param_x | See above |
param_y | See above |
path | Path to image file |
void lg_clear_bg | ( | uint8_t | red, |
uint8_t | green, | ||
uint8_t | blue | ||
) |
Clear/paint with glClear(GL_COLOR_BUFFER_BIT) the viewport with colors - alpha = 255
NOTE: if followed by lg_swap_fb() without delay, and if a complete swap is needed, you may want to use glFinish() afterwards
red | |
green | |
blue |
void lg_clear_bg_full | ( | uint8_t | red, |
uint8_t | green, | ||
uint8_t | blue, | ||
uint8_t | alpha, | ||
GLbitfield | mask | ||
) |
glClear() everything then clear/paint the viewport with colors and mask
NOTE: if followed by lg_swap_fb() without delay, and if a complete swap is needed, you may want to use glFinish() afterwards
GLbitfield is 32-bit
red | |
green | |
blue | |
alpha | |
mask | Bitwise OR of GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT |
void lg_bg_info | ( | ) |
Print out background texture info, if set and valid
int lg_read_and_render_screen_back | ( | ) |
(Self-explanatory enough)