Project Alice
|
Namespaces | |
namespace | parameters |
Classes | |
struct | color3f |
struct | data |
class | data_texture |
struct | DDS_header |
struct | font_texture_result |
struct | image |
class | lines |
class | texture |
Typedefs | |
typedef void(APIENTRY * | P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) |
Enumerations | |
enum class | color_modification { none , disabled , interactable , interactable_disabled } |
enum | { SOIL_CAPABILITY_UNKNOWN = -1 , SOIL_CAPABILITY_NONE = 0 , SOIL_CAPABILITY_PRESENT = 1 } |
enum | { SOIL_FLAG_TEXTURE_REPEATS = 4 } |
Functions | |
constexpr uint32_t | color_from_hash (uint32_t color) |
uint32_t | color_gradient (float percent, uint32_t top_color, uint32_t bot_color) |
template<class T > | |
uint32_t | get_ui_color (sys::state &state, T id) |
template<> | |
uint32_t | get_ui_color (sys::state &state, dcon::political_party_id id) |
template<> | |
uint32_t | get_ui_color (sys::state &state, dcon::issue_option_id id) |
template<> | |
uint32_t | get_ui_color (sys::state &state, dcon::crime_id id) |
std::string_view | opengl_get_error_name (GLenum t) |
void | notify_user_of_fatal_opengl_error (std::string message) |
GLint | compile_shader (std::string_view source, GLenum type) |
GLuint | create_program (std::string_view vertex_shader, std::string_view fragment_shader) |
void | load_special_icons (sys::state &state) |
std::string_view | framebuffer_error (GLenum e) |
void | initialize_msaa (sys::state &state, int32_t size_x, int32_t size_y) |
void | deinitialize_msaa (sys::state &state) |
void | initialize_opengl (sys::state &state) |
void | load_shaders (sys::state &state) |
void | load_global_squares (sys::state &state) |
auto | map_color_modification_to_index (color_modification e) |
void | bind_vertices_by_rotation (sys::state const &state, ui::rotation r, bool flipped, bool rtl) |
void | render_simple_rect (sys::state const &state, float x, float y, float width, float height, ui::rotation r, bool flipped, bool rtl) |
void | render_textured_rect (sys::state const &state, color_modification enabled, float x, float y, float width, float height, GLuint texture_handle, ui::rotation r, bool flipped, bool rtl) |
void | render_textured_rect_direct (sys::state const &state, float x, float y, float width, float height, uint32_t handle) |
void | render_linegraph (sys::state const &state, color_modification enabled, float x, float y, float width, float height, lines &l) |
void | render_linegraph (sys::state const &state, color_modification enabled, float x, float y, float width, float height, float r, float g, float b, lines &l) |
void | render_barchart (sys::state const &state, color_modification enabled, float x, float y, float width, float height, data_texture &t, ui::rotation r, bool flipped, bool rtl) |
void | render_piechart (sys::state const &state, color_modification enabled, float x, float y, float size, data_texture &t) |
void | render_bordered_rect (sys::state const &state, color_modification enabled, float border_size, float x, float y, float width, float height, GLuint texture_handle, ui::rotation r, bool flipped, bool rtl) |
void | render_masked_rect (sys::state const &state, color_modification enabled, float x, float y, float width, float height, GLuint texture_handle, GLuint mask_texture_handle, ui::rotation r, bool flipped, bool rtl) |
void | render_progress_bar (sys::state const &state, color_modification enabled, float progress, float x, float y, float width, float height, GLuint left_texture_handle, GLuint right_texture_handle, ui::rotation r, bool flipped, bool rtl) |
void | render_tinted_textured_rect (sys::state const &state, float x, float y, float width, float height, float r, float g, float b, GLuint texture_handle, ui::rotation rot, bool flipped, bool rtl) |
void | render_tinted_rect (sys::state const &state, float x, float y, float width, float height, float r, float g, float b, ui::rotation rot, bool flipped, bool rtl) |
void | render_tinted_subsprite (sys::state const &state, int frame, int total_frames, float x, float y, float width, float height, float r, float g, float b, GLuint texture_handle, ui::rotation rot, bool flipped, bool rtl) |
void | render_subsprite (sys::state const &state, color_modification enabled, int frame, int total_frames, float x, float y, float width, float height, GLuint texture_handle, ui::rotation r, bool flipped, bool rtl) |
GLuint | get_flag_texture_handle_from_tag (sys::state &state, const char tag[3]) |
bool | display_tag_is_valid (sys::state &state, char tag[3]) |
void | render_text_icon (sys::state &state, text::embedded_icon ico, float x, float baseline_y, float font_size, text::font &f, ogl::color_modification cmod) |
void | render_text_flag (sys::state &state, text::embedded_flag ico, float x, float baseline_y, float font_size, text::font &f, ogl::color_modification cmod) |
void | render_text_unit_icon (sys::state &state, text::embedded_unit_icon ico, float x, float baseline_y, float font_size, text::font &f, ogl::color_modification cmod) |
void | internal_text_render (sys::state &state, text::stored_glyphs const &txt, float x, float baseline_y, float size, text::font &f) |
void | render_classic_text (sys::state &state, text::stored_glyphs const &txt, float x, float y, float size, color_modification enabled, color3f const &c, text::bm_font const &font, text::font &base_font) |
void | render_new_text (sys::state &state, text::stored_glyphs const &txt, color_modification enabled, float x, float y, float size, color3f const &c, text::font &f) |
void | render_text (sys::state &state, text::stored_glyphs const &txt, color_modification enabled, float x, float y, color3f const &c, uint16_t font_id) |
bool | msaa_enabled (sys::state const &state) |
image | load_stb_image (simple_fs::file &file) |
GLuint | make_gl_texture (uint8_t *data, uint32_t size_x, uint32_t size_y, uint32_t channels) |
GLuint | make_gl_texture (simple_fs::directory const &dir, native_string_view file_name) |
void | set_gltex_parameters (GLuint texture_handle, GLuint texture_type, GLuint filter, GLuint wrap) |
GLuint | load_texture_array_from_file (simple_fs::file &file, int32_t tiles_x, int32_t tiles_y) |
void | debug_callback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei, GLchar const *message, void const *) |
void | create_opengl_context (sys::state &state) |
void | shutdown_opengl (sys::state &state) |
void | render_simple_rect (sys::state const &state, float x, float y, float width, float height, ui::rotation r, bool flipped) |
void | render_new_text (sys::state const &state, text::stored_glyphs const &txt, color_modification enabled, float x, float y, float size, color3f const &c, text::font &f) |
int | query_DXT_capability (void) |
GLuint | SOIL_direct_load_DDS_from_memory (unsigned char const *const buffer, uint32_t buffer_length, uint32_t &width, uint32_t &height, int soil_flags) |
GLuint | load_file_and_return_handle (native_string const &native_name, simple_fs::file_system const &fs, texture &asset_texture, bool keep_data) |
native_string | flag_type_to_name (sys::state &state, culture::flag_type type) |
GLuint | get_flag_handle (sys::state &state, dcon::national_identity_id nat_id, culture::flag_type type) |
GLuint | get_texture_handle (sys::state &state, dcon::texture_id id, bool keep_data) |
font_texture_result | make_font_texture (simple_fs::file &f) |
template<> | |
uint32_t | get_ui_color (sys::state &state, dcon::pop_satisfaction_wrapper_id id) |
typedef void(APIENTRY * ogl::P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) |
Definition at line 110 of file texture.cpp.
anonymous enum |
Enumerator | |
---|---|
SOIL_CAPABILITY_UNKNOWN | |
SOIL_CAPABILITY_NONE | |
SOIL_CAPABILITY_PRESENT |
Definition at line 100 of file texture.cpp.
anonymous enum |
Enumerator | |
---|---|
SOIL_FLAG_TEXTURE_REPEATS |
Definition at line 19 of file texture.hpp.
|
strong |
Enumerator | |
---|---|
none | |
disabled | |
interactable | |
interactable_disabled |
Definition at line 47 of file opengl_wrapper.hpp.
void ogl::bind_vertices_by_rotation | ( | sys::state const & | state, |
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
GLint ogl::compile_shader | ( | std::string_view | source, |
GLenum | type | ||
) |
Definition at line 40 of file opengl_wrapper.cpp.
void ogl::create_opengl_context | ( | sys::state & | state | ) |
Definition at line 6 of file opengl_wrapper_nix.cpp.
GLuint ogl::create_program | ( | std::string_view | vertex_shader, |
std::string_view | fragment_shader | ||
) |
Definition at line 75 of file opengl_wrapper.cpp.
|
inline |
void ogl::deinitialize_msaa | ( | sys::state & | state | ) |
bool ogl::display_tag_is_valid | ( | sys::state & | state, |
char | tag[3] | ||
) |
native_string ogl::flag_type_to_name | ( | sys::state & | state, |
culture::flag_type | type | ||
) |
Definition at line 544 of file texture.cpp.
std::string_view ogl::framebuffer_error | ( | GLenum | e | ) |
GLuint ogl::get_flag_handle | ( | sys::state & | state, |
dcon::national_identity_id | nat_id, | ||
culture::flag_type | type | ||
) |
GLuint ogl::get_flag_texture_handle_from_tag | ( | sys::state & | state, |
const char | tag[3] | ||
) |
GLuint ogl::get_texture_handle | ( | sys::state & | state, |
dcon::texture_id | id, | ||
bool | keep_data | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ogl::initialize_msaa | ( | sys::state & | state, |
int32_t | size_x, | ||
int32_t | size_y | ||
) |
Definition at line 182 of file opengl_wrapper.cpp.
void ogl::initialize_opengl | ( | sys::state & | state | ) |
Definition at line 288 of file opengl_wrapper.cpp.
void ogl::internal_text_render | ( | sys::state & | state, |
text::stored_glyphs const & | txt, | ||
float | x, | ||
float | baseline_y, | ||
float | size, | ||
text::font & | f | ||
) |
Definition at line 948 of file opengl_wrapper.cpp.
GLuint ogl::load_file_and_return_handle | ( | native_string const & | native_name, |
simple_fs::file_system const & | fs, | ||
texture & | asset_texture, | ||
bool | keep_data | ||
) |
void ogl::load_global_squares | ( | sys::state & | state | ) |
void ogl::load_shaders | ( | sys::state & | state | ) |
Definition at line 402 of file opengl_wrapper.cpp.
void ogl::load_special_icons | ( | sys::state & | state | ) |
Definition at line 106 of file opengl_wrapper.cpp.
image ogl::load_stb_image | ( | simple_fs::file & | file | ) |
Definition at line 1078 of file opengl_wrapper.cpp.
GLuint ogl::load_texture_array_from_file | ( | simple_fs::file & | file, |
int32_t | tiles_x, | ||
int32_t | tiles_y | ||
) |
Definition at line 1124 of file opengl_wrapper.cpp.
font_texture_result ogl::make_font_texture | ( | simple_fs::file & | f | ) |
Definition at line 745 of file texture.cpp.
GLuint ogl::make_gl_texture | ( | simple_fs::directory const & | dir, |
native_string_view | file_name | ||
) |
|
inline |
bool ogl::msaa_enabled | ( | sys::state const & | state | ) |
void ogl::notify_user_of_fatal_opengl_error | ( | std::string | message | ) |
Definition at line 32 of file opengl_wrapper.cpp.
std::string_view ogl::opengl_get_error_name | ( | GLenum | t | ) |
int ogl::query_DXT_capability | ( | void | ) |
void ogl::render_barchart | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
data_texture & | t, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
void ogl::render_bordered_rect | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | border_size, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
GLuint | texture_handle, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 676 of file opengl_wrapper.cpp.
void ogl::render_classic_text | ( | sys::state & | state, |
text::stored_glyphs const & | txt, | ||
float | x, | ||
float | y, | ||
float | size, | ||
color_modification | enabled, | ||
color3f const & | c, | ||
text::bm_font const & | font, | ||
text::font & | base_font | ||
) |
Definition at line 972 of file opengl_wrapper.cpp.
void ogl::render_linegraph | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
float | r, | ||
float | g, | ||
float | b, | ||
lines & | l | ||
) |
void ogl::render_linegraph | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
lines & | l | ||
) |
Definition at line 589 of file opengl_wrapper.cpp.
void ogl::render_masked_rect | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
GLuint | texture_handle, | ||
GLuint | mask_texture_handle, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 695 of file opengl_wrapper.cpp.
void ogl::render_new_text | ( | sys::state & | state, |
text::stored_glyphs const & | txt, | ||
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | size, | ||
color3f const & | c, | ||
text::font & | f | ||
) |
Definition at line 1023 of file opengl_wrapper.cpp.
void ogl::render_new_text | ( | sys::state const & | state, |
text::stored_glyphs const & | txt, | ||
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | size, | ||
color3f const & | c, | ||
text::font & | f | ||
) |
void ogl::render_piechart | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | size, | ||
data_texture & | t | ||
) |
Definition at line 659 of file opengl_wrapper.cpp.
void ogl::render_progress_bar | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | progress, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
GLuint | left_texture_handle, | ||
GLuint | right_texture_handle, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 715 of file opengl_wrapper.cpp.
void ogl::render_simple_rect | ( | sys::state const & | state, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
ui::rotation | r, | ||
bool | flipped | ||
) |
void ogl::render_simple_rect | ( | sys::state const & | state, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
void ogl::render_subsprite | ( | sys::state const & | state, |
color_modification | enabled, | ||
int | frame, | ||
int | total_frames, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
GLuint | texture_handle, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 792 of file opengl_wrapper.cpp.
void ogl::render_text | ( | sys::state & | state, |
text::stored_glyphs const & | txt, | ||
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
color3f const & | c, | ||
uint16_t | font_id | ||
) |
Definition at line 1029 of file opengl_wrapper.cpp.
void ogl::render_text_flag | ( | sys::state & | state, |
text::embedded_flag | ico, | ||
float | x, | ||
float | baseline_y, | ||
float | font_size, | ||
text::font & | f, | ||
ogl::color_modification | cmod | ||
) |
Definition at line 892 of file opengl_wrapper.cpp.
void ogl::render_text_icon | ( | sys::state & | state, |
text::embedded_icon | ico, | ||
float | x, | ||
float | baseline_y, | ||
float | font_size, | ||
text::font & | f, | ||
ogl::color_modification | cmod | ||
) |
Definition at line 853 of file opengl_wrapper.cpp.
void ogl::render_text_unit_icon | ( | sys::state & | state, |
text::embedded_unit_icon | ico, | ||
float | x, | ||
float | baseline_y, | ||
float | font_size, | ||
text::font & | f, | ||
ogl::color_modification | cmod | ||
) |
Definition at line 916 of file opengl_wrapper.cpp.
void ogl::render_textured_rect | ( | sys::state const & | state, |
color_modification | enabled, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
GLuint | texture_handle, | ||
ui::rotation | r, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 553 of file opengl_wrapper.cpp.
void ogl::render_textured_rect_direct | ( | sys::state const & | state, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
uint32_t | handle | ||
) |
Definition at line 572 of file opengl_wrapper.cpp.
void ogl::render_tinted_rect | ( | sys::state const & | state, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
float | r, | ||
float | g, | ||
float | b, | ||
ui::rotation | rot, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 755 of file opengl_wrapper.cpp.
void ogl::render_tinted_subsprite | ( | sys::state const & | state, |
int | frame, | ||
int | total_frames, | ||
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
float | r, | ||
float | g, | ||
float | b, | ||
GLuint | texture_handle, | ||
ui::rotation | rot, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 770 of file opengl_wrapper.cpp.
void ogl::render_tinted_textured_rect | ( | sys::state const & | state, |
float | x, | ||
float | y, | ||
float | width, | ||
float | height, | ||
float | r, | ||
float | g, | ||
float | b, | ||
GLuint | texture_handle, | ||
ui::rotation | rot, | ||
bool | flipped, | ||
bool | rtl | ||
) |
Definition at line 736 of file opengl_wrapper.cpp.
void ogl::set_gltex_parameters | ( | GLuint | texture_handle, |
GLuint | texture_type, | ||
GLuint | filter, | ||
GLuint | wrap | ||
) |
void ogl::shutdown_opengl | ( | sys::state & | state | ) |
GLuint ogl::SOIL_direct_load_DDS_from_memory | ( | unsigned char const *const | buffer, |
uint32_t | buffer_length, | ||
uint32_t & | width, | ||
uint32_t & | height, | ||
int | soil_flags | ||
) |
Definition at line 180 of file texture.cpp.