LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
LG_Env Struct Reference
Collaboration diagram for LG_Env:

Data Fields

int sdl_display
 
SDL_DisplayMode sdl_display_mode
 
int sdl_convert_surf_format
 
int sdl_create_rgb_surf_bitdepth
 
int r_size
 
int g_size
 
int b_size
 
int a_size
 
uint32_t r_mask
 
uint32_t g_mask
 
uint32_t b_mask
 
uint32_t a_mask
 
int screen_w
 
int screen_h
 
SDL_Window * gl_win
 
SDL_GLContext gl_context
 
int gles_maj_v
 
int gles_min_v
 
int top_win_logical_w
 
int top_win_logical_h
 
Rec2Di viewport_rect
 
zboolean fullscreen
 
float fullscreen_scale
 
int max_combined_texture_image_units
 
int max_texture_size
 
int max_cubemap_texture_size
 
LG_Texturebg_uniq_tex
 
LG_Color_u bg_color
 
int bg_shift_x
 
int bg_shift_y
 
char * app_name
 
char * app_cmd
 
char * org_name_android
 
char * app_name_android
 
char * assets_dir
 
char * app_wr_dir
 
char * vbo_cache
 
char * obj_cache
 
zboolean enable_mouse
 
zboolean oes_vao_extension
 
void(* glGenVertexArraysOES )(GLsizei, GLuint *)
 
void(* glBindVertexArrayOES )(GLuint)
 
void(* glDeleteVertexArraysOES )(GLsizei, const GLuint *)
 
void(* glIsVertexArrayOES )(GLuint)
 
zboolean oes_element_index_uint_extension
 
zboolean ext_draw_instanced_extension
 
zboolean ext_texcompr_s3tc_extension
 
zboolean oes_texcompr_etc1_rgb8_extension
 
zboolean khr_texcompr_astc_ldr_extension
 
LG_ErrorContext last_error_context
 
float luminosity_k
 
LG_Sound ** sounds
 

Detailed Description

=== LibGame environnement struct ===

This is also a spec that the code is supposed to implement (should be like that for all comments).

=== LibGame 2D coords sys ===

  • Usually = SDL coords sys (y axis goes down) != OpenGL coords sys (y axis goes up)
  • SDL uses int's in [0 - win_w] x [0 - win_h] with origin at top left corner
  • OpenGL uses float's in [-1.0f, 1.0f] x [-1.0f, 1.0f] with origin at center
  • OpenGL win uses int's in [0 - gl_win w] x [0 - gl_win h] with origin at bottom left corner (-> glViewport() and glScissor() coords sys is (0, 0) = bottom-left, in pixels)

To avoid endless confusion, always mention 2D coords sys in func definition


The documentation for this struct was generated from the following file: