LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024 ETMSoftware
|
Functions | |
int | lg_init (int win_w, int win_h, const char *win_title, const char *app_name, const char *app_cmd, const char *org_name_android, const char *app_name_android, const char *assets_dir, const char *app_wr_dir) |
Rec2Di | lg_get_default_viewport () |
void | lg_set_new_viewport (Rec2Di viewport) |
void | lg_reset_viewport () |
void | lg_enable_mouse () |
void | lg_disable_mouse () |
void | lg_list_opengl_extensions () |
int | lg_load_fonts () |
void | lg_quit (int exit_code) |
void | lg_swap_fb () |
void | lg_show_lib_info () |
void | lg_show_sys_info () |
void | lg_show_extra_sys_info (SDL_Window *w) |
zboolean | sdl2_is_installed () |
char * | lg_get_sdl_win_flags (SDL_Window *w) |
Libgame-0.4.0 - Copyright (C) 2011-2024 Emmanuel Thomas-Maurin < [email protected] > - All rights reserved LibGame is a SDL2/OpenGL ES 2.0 2D/3D minimalist game engine, which doesn't attempt to do *everything* but does only certain things and does them *well*, while not preventing you from doing other things (huh ?) This version supports both Linux Desktop and Android (with NDK).
int lg_init | ( | int | win_w, |
int | win_h, | ||
const char * | win_title, | ||
const char * | app_name, | ||
const char * | app_cmd, | ||
const char * | org_name_android, | ||
const char * | app_name_android, | ||
const char * | assets_dir, | ||
const char * | app_wr_dir | ||
) |
Init Libgame
Initialize SDL, OpenGL ES 2.0, LG_Renderer2D instance, and some other stuff. Window dims are mandatory - in fullscreen mode, they defined the env logical size. First 'reset' members of current instance of LG_Env struct. The fullscreen flag (lg_get_game_env()->fullscreen) must be set by calling code. On Android, orientation is/must always be landscape.
Special app dirs:
win_w | |
win_h | |
win_title | |
app_name | |
app_cmd | |
org_name_android | |
app_name_android | |
assets_dir | |
app_wr_dir |
Rec2Di lg_get_default_viewport | ( | ) |
Get default viewport rect
void lg_set_new_viewport | ( | Rec2Di | viewport | ) |
Set a new viewport
viewport | A new viewport as a Rec2Di |
void lg_reset_viewport | ( | ) |
Reset viewport to its default values
void lg_enable_mouse | ( | ) |
Enable mouse support: mouse inputs will be read in lg_get_user_input()
void lg_disable_mouse | ( | ) |
Disable mouse support: mouse inputs will be ignored in lg_get_user_input()
void lg_list_opengl_extensions | ( | ) |
(self explanatory)
int lg_load_fonts | ( | ) |
(self explanatory)
void lg_quit | ( | int | exit_code | ) |
Make a 'clean' exit, ie release all allocated resources and quit
void lg_swap_fb | ( | ) |
Swap framebuffer
NOTE: if a complete swap is needed, you may want to use glFinish() afterwards
void lg_show_lib_info | ( | ) |
(self explanatory)
void lg_show_sys_info | ( | ) |
(self explanatory)
void lg_show_extra_sys_info | ( | SDL_Window * | w | ) |
(self explanatory)
zboolean sdl2_is_installed | ( | ) |
(self explanatory)
char* lg_get_sdl_win_flags | ( | SDL_Window * | w | ) |
Must be freed afterwards