Project Alice
Loading...
Searching...
No Matches
texture.cpp File Reference
#include "texture.hpp"
#include "system_state.hpp"
#include "simple_fs.hpp"
#include "stb_image.h"
Include dependency graph for texture.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ogl::DDS_header
 

Namespaces

namespace  ogl
 

Macros

#define STB_IMAGE_IMPLEMENTATION   1
 
#define STBI_NO_STDIO   1
 
#define STBI_NO_LINEAR   1
 
#define STBI_NO_JPEG   1
 
#define STBI_NO_PSD   1
 
#define STBI_NO_GIF   1
 
#define STBI_NO_HDR   1
 
#define STBI_NO_PIC   1
 
#define STBI_NO_PNM   1
 
#define STBI_NO_THREAD_LOCALS   1
 
#define DDSD_CAPS   0x00000001
 
#define DDSD_HEIGHT   0x00000002
 
#define DDSD_WIDTH   0x00000004
 
#define DDSD_PITCH   0x00000008
 
#define DDSD_PIXELFORMAT   0x00001000
 
#define DDSD_MIPMAPCOUNT   0x00020000
 
#define DDSD_LINEARSIZE   0x00080000
 
#define DDSD_DEPTH   0x00800000
 
#define DDPF_ALPHAPIXELS   0x00000001
 
#define DDPF_FOURCC   0x00000004
 
#define DDPF_RGB   0x00000040
 
#define DDPF_PALETTEINDEXED8   0x00000020
 
#define DDSCAPS_COMPLEX   0x00000008
 
#define DDSCAPS_TEXTURE   0x00001000
 
#define DDSCAPS_MIPMAP   0x00400000
 
#define DDSCAPS2_CUBEMAP   0x00000200
 
#define DDSCAPS2_CUBEMAP_POSITIVEX   0x00000400
 
#define DDSCAPS2_CUBEMAP_NEGATIVEX   0x00000800
 
#define DDSCAPS2_CUBEMAP_POSITIVEY   0x00001000
 
#define DDSCAPS2_CUBEMAP_NEGATIVEY   0x00002000
 
#define DDSCAPS2_CUBEMAP_POSITIVEZ   0x00004000
 
#define DDSCAPS2_CUBEMAP_NEGATIVEZ   0x00008000
 
#define DDSCAPS2_VOLUME   0x00200000
 
#define SOIL_GL_SRGB   0x8C40
 
#define SOIL_GL_SRGB_ALPHA   0x8C42
 
#define SOIL_RGB_S3TC_DXT1   0x83F0
 
#define SOIL_RGBA_S3TC_DXT1   0x83F1
 
#define SOIL_RGBA_S3TC_DXT3   0x83F2
 
#define SOIL_RGBA_S3TC_DXT5   0x83F3
 
#define SOIL_TEXTURE_WRAP_R   0x8072
 
#define SOIL_CLAMP_TO_EDGE   0x812F
 
#define SOIL_REFLECTION_MAP   0x8512
 

Functions

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)
 
GLuint ogl::SOIL_direct_load_DDS_array_from_memory (unsigned char const *const buffer, uint32_t buffer_length, uint32_t &width, uint32_t &height, int soil_flags, uint32_t tiles_x, uint32_t tiles_y)
 
GLuint ogl::load_file_and_return_handle (native_string const &native_name, simple_fs::file_system const &fs, texture &asset_texture, bool keep_data)
 
native_string ogl::flag_type_to_name (sys::state &state, culture::flag_type type)
 
GLuint ogl::get_flag_handle (sys::state &state, dcon::national_identity_id nat_id, culture::flag_type type)
 
GLuint ogl::get_rebel_flag_handle (sys::state &state, dcon::rebel_faction_id faction)
 
GLuint ogl::get_late_load_texture_handle (sys::state &state, dcon::texture_id &id, std::string_view asset_name)
 
GLuint ogl::get_texture_handle (sys::state &state, dcon::texture_id id, bool keep_data)
 
font_texture_result ogl::make_font_texture (simple_fs::file &f)
 

Macro Definition Documentation

◆ DDPF_ALPHAPIXELS

#define DDPF_ALPHAPIXELS   0x00000001

Definition at line 35 of file texture.cpp.

◆ DDPF_FOURCC

#define DDPF_FOURCC   0x00000004

Definition at line 36 of file texture.cpp.

◆ DDPF_PALETTEINDEXED8

#define DDPF_PALETTEINDEXED8   0x00000020

Definition at line 38 of file texture.cpp.

◆ DDPF_RGB

#define DDPF_RGB   0x00000040

Definition at line 37 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP

#define DDSCAPS2_CUBEMAP   0x00000200

Definition at line 48 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_NEGATIVEX

#define DDSCAPS2_CUBEMAP_NEGATIVEX   0x00000800

Definition at line 50 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_NEGATIVEY

#define DDSCAPS2_CUBEMAP_NEGATIVEY   0x00002000

Definition at line 52 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_NEGATIVEZ

#define DDSCAPS2_CUBEMAP_NEGATIVEZ   0x00008000

Definition at line 54 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_POSITIVEX

#define DDSCAPS2_CUBEMAP_POSITIVEX   0x00000400

Definition at line 49 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_POSITIVEY

#define DDSCAPS2_CUBEMAP_POSITIVEY   0x00001000

Definition at line 51 of file texture.cpp.

◆ DDSCAPS2_CUBEMAP_POSITIVEZ

#define DDSCAPS2_CUBEMAP_POSITIVEZ   0x00004000

Definition at line 53 of file texture.cpp.

◆ DDSCAPS2_VOLUME

#define DDSCAPS2_VOLUME   0x00200000

Definition at line 55 of file texture.cpp.

◆ DDSCAPS_COMPLEX

#define DDSCAPS_COMPLEX   0x00000008

Definition at line 42 of file texture.cpp.

◆ DDSCAPS_MIPMAP

#define DDSCAPS_MIPMAP   0x00400000

Definition at line 44 of file texture.cpp.

◆ DDSCAPS_TEXTURE

#define DDSCAPS_TEXTURE   0x00001000

Definition at line 43 of file texture.cpp.

◆ DDSD_CAPS

#define DDSD_CAPS   0x00000001

Definition at line 25 of file texture.cpp.

◆ DDSD_DEPTH

#define DDSD_DEPTH   0x00800000

Definition at line 32 of file texture.cpp.

◆ DDSD_HEIGHT

#define DDSD_HEIGHT   0x00000002

Definition at line 26 of file texture.cpp.

◆ DDSD_LINEARSIZE

#define DDSD_LINEARSIZE   0x00080000

Definition at line 31 of file texture.cpp.

◆ DDSD_MIPMAPCOUNT

#define DDSD_MIPMAPCOUNT   0x00020000

Definition at line 30 of file texture.cpp.

◆ DDSD_PITCH

#define DDSD_PITCH   0x00000008

Definition at line 28 of file texture.cpp.

◆ DDSD_PIXELFORMAT

#define DDSD_PIXELFORMAT   0x00001000

Definition at line 29 of file texture.cpp.

◆ DDSD_WIDTH

#define DDSD_WIDTH   0x00000004

Definition at line 27 of file texture.cpp.

◆ SOIL_CLAMP_TO_EDGE

#define SOIL_CLAMP_TO_EDGE   0x812F

Definition at line 65 of file texture.cpp.

◆ SOIL_GL_SRGB

#define SOIL_GL_SRGB   0x8C40

Definition at line 57 of file texture.cpp.

◆ SOIL_GL_SRGB_ALPHA

#define SOIL_GL_SRGB_ALPHA   0x8C42

Definition at line 58 of file texture.cpp.

◆ SOIL_REFLECTION_MAP

#define SOIL_REFLECTION_MAP   0x8512

Definition at line 66 of file texture.cpp.

◆ SOIL_RGB_S3TC_DXT1

#define SOIL_RGB_S3TC_DXT1   0x83F0

Definition at line 59 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT1

#define SOIL_RGBA_S3TC_DXT1   0x83F1

Definition at line 60 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT3

#define SOIL_RGBA_S3TC_DXT3   0x83F2

Definition at line 61 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT5

#define SOIL_RGBA_S3TC_DXT5   0x83F3

Definition at line 62 of file texture.cpp.

◆ SOIL_TEXTURE_WRAP_R

#define SOIL_TEXTURE_WRAP_R   0x8072

Definition at line 64 of file texture.cpp.

◆ STB_IMAGE_IMPLEMENTATION

#define STB_IMAGE_IMPLEMENTATION   1

Definition at line 5 of file texture.cpp.

◆ STBI_NO_GIF

#define STBI_NO_GIF   1

Definition at line 13 of file texture.cpp.

◆ STBI_NO_HDR

#define STBI_NO_HDR   1

Definition at line 14 of file texture.cpp.

◆ STBI_NO_JPEG

#define STBI_NO_JPEG   1

Definition at line 8 of file texture.cpp.

◆ STBI_NO_LINEAR

#define STBI_NO_LINEAR   1

Definition at line 7 of file texture.cpp.

◆ STBI_NO_PIC

#define STBI_NO_PIC   1

Definition at line 15 of file texture.cpp.

◆ STBI_NO_PNM

#define STBI_NO_PNM   1

Definition at line 16 of file texture.cpp.

◆ STBI_NO_PSD

#define STBI_NO_PSD   1

Definition at line 11 of file texture.cpp.

◆ STBI_NO_STDIO

#define STBI_NO_STDIO   1

Definition at line 6 of file texture.cpp.

◆ STBI_NO_THREAD_LOCALS

#define STBI_NO_THREAD_LOCALS   1

Definition at line 17 of file texture.cpp.