![]() |
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
|
Functions | |
| zboolean | lg_bg_new (const char *path, int scale_x, int scale_y) |
| zboolean | lg_bg_draw (int shift_x, int shift_y) |
| void | lg_bg_clear (uint8_t red, uint8_t green, uint8_t blue) |
| void | lg_bg_clear_full (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha, GLbitfield mask) |
| zboolean | lg_bg_free () |
| void | lg_bg_info () |
| zboolean | lg_read_and_render_screen_back () |
=== Draw background, and these sorts of things === So far: - Background is unique - background texture is env->bg_uniq_tex
| zboolean lg_bg_new | ( | const char * | path, |
| int | scale_x, | ||
| int | scale_y | ||
| ) |
Load background texture with scaling
| scale_x | |
| scale_y | |
| path | Path to image file |
| zboolean lg_bg_draw | ( | int | shift_x, |
| int | shift_y | ||
| ) |
Draw background with shifting
| shift_x | |
| shift_y | |
| path | Path to image file |
| void lg_bg_clear | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Clear background with RGB color
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_bg_clear_full | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue, | ||
| uint8_t | alpha, | ||
| GLbitfield | mask | ||
| ) |
Clear background with RGBA 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 |
| zboolean lg_bg_free | ( | ) |
Free background texture
| void lg_bg_info | ( | ) |
Print out background texture info
| zboolean lg_read_and_render_screen_back | ( | ) |
(Self-explanatory enough)
WARNING: Doesn't swap framebuffer