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 ALICE_DDSD_CAPS   0x00000001
 
#define ALICE_DDSD_HEIGHT   0x00000002
 
#define ALICE_DDSD_WIDTH   0x00000004
 
#define ALICE_DDSD_PITCH   0x00000008
 
#define ALICE_DDSD_PIXELFORMAT   0x00001000
 
#define ALICE_DDSD_MIPMAPCOUNT   0x00020000
 
#define ALICE_DDSD_LINEARSIZE   0x00080000
 
#define ALICE_DDSD_DEPTH   0x00800000
 
#define ALICE_DDPF_ALPHAPIXELS   0x00000001
 
#define ALICE_DDPF_FOURCC   0x00000004
 
#define ALICE_DDPF_RGB   0x00000040
 
#define ALICE_DDSCAPS_COMPLEX   0x00000008
 
#define ALICE_DDSCAPS_TEXTURE   0x00001000
 
#define ALICE_DDSCAPS_MIPMAP   0x00400000
 
#define ALICE_DDSCAPS2_CUBEMAP   0x00000200
 
#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEX   0x00000400
 
#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEX   0x00000800
 
#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEY   0x00001000
 
#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEY   0x00002000
 
#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEZ   0x00004000
 
#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEZ   0x00008000
 
#define ALICE_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::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_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

◆ ALICE_DDPF_ALPHAPIXELS

#define ALICE_DDPF_ALPHAPIXELS   0x00000001

Definition at line 35 of file texture.cpp.

◆ ALICE_DDPF_FOURCC

#define ALICE_DDPF_FOURCC   0x00000004

Definition at line 36 of file texture.cpp.

◆ ALICE_DDPF_RGB

#define ALICE_DDPF_RGB   0x00000040

Definition at line 37 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP

#define ALICE_DDSCAPS2_CUBEMAP   0x00000200

Definition at line 47 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_NEGATIVEX

#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEX   0x00000800

Definition at line 49 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_NEGATIVEY

#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEY   0x00002000

Definition at line 51 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_NEGATIVEZ

#define ALICE_DDSCAPS2_CUBEMAP_NEGATIVEZ   0x00008000

Definition at line 53 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_POSITIVEX

#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEX   0x00000400

Definition at line 48 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_POSITIVEY

#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEY   0x00001000

Definition at line 50 of file texture.cpp.

◆ ALICE_DDSCAPS2_CUBEMAP_POSITIVEZ

#define ALICE_DDSCAPS2_CUBEMAP_POSITIVEZ   0x00004000

Definition at line 52 of file texture.cpp.

◆ ALICE_DDSCAPS2_VOLUME

#define ALICE_DDSCAPS2_VOLUME   0x00200000

Definition at line 54 of file texture.cpp.

◆ ALICE_DDSCAPS_COMPLEX

#define ALICE_DDSCAPS_COMPLEX   0x00000008

Definition at line 41 of file texture.cpp.

◆ ALICE_DDSCAPS_MIPMAP

#define ALICE_DDSCAPS_MIPMAP   0x00400000

Definition at line 43 of file texture.cpp.

◆ ALICE_DDSCAPS_TEXTURE

#define ALICE_DDSCAPS_TEXTURE   0x00001000

Definition at line 42 of file texture.cpp.

◆ ALICE_DDSD_CAPS

#define ALICE_DDSD_CAPS   0x00000001

Definition at line 25 of file texture.cpp.

◆ ALICE_DDSD_DEPTH

#define ALICE_DDSD_DEPTH   0x00800000

Definition at line 32 of file texture.cpp.

◆ ALICE_DDSD_HEIGHT

#define ALICE_DDSD_HEIGHT   0x00000002

Definition at line 26 of file texture.cpp.

◆ ALICE_DDSD_LINEARSIZE

#define ALICE_DDSD_LINEARSIZE   0x00080000

Definition at line 31 of file texture.cpp.

◆ ALICE_DDSD_MIPMAPCOUNT

#define ALICE_DDSD_MIPMAPCOUNT   0x00020000

Definition at line 30 of file texture.cpp.

◆ ALICE_DDSD_PITCH

#define ALICE_DDSD_PITCH   0x00000008

Definition at line 28 of file texture.cpp.

◆ ALICE_DDSD_PIXELFORMAT

#define ALICE_DDSD_PIXELFORMAT   0x00001000

Definition at line 29 of file texture.cpp.

◆ ALICE_DDSD_WIDTH

#define ALICE_DDSD_WIDTH   0x00000004

Definition at line 27 of file texture.cpp.

◆ SOIL_CLAMP_TO_EDGE

#define SOIL_CLAMP_TO_EDGE   0x812F

Definition at line 64 of file texture.cpp.

◆ SOIL_GL_SRGB

#define SOIL_GL_SRGB   0x8C40

Definition at line 56 of file texture.cpp.

◆ SOIL_GL_SRGB_ALPHA

#define SOIL_GL_SRGB_ALPHA   0x8C42

Definition at line 57 of file texture.cpp.

◆ SOIL_REFLECTION_MAP

#define SOIL_REFLECTION_MAP   0x8512

Definition at line 65 of file texture.cpp.

◆ SOIL_RGB_S3TC_DXT1

#define SOIL_RGB_S3TC_DXT1   0x83F0

Definition at line 58 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT1

#define SOIL_RGBA_S3TC_DXT1   0x83F1

Definition at line 59 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT3

#define SOIL_RGBA_S3TC_DXT3   0x83F2

Definition at line 60 of file texture.cpp.

◆ SOIL_RGBA_S3TC_DXT5

#define SOIL_RGBA_S3TC_DXT5   0x83F3

Definition at line 61 of file texture.cpp.

◆ SOIL_TEXTURE_WRAP_R

#define SOIL_TEXTURE_WRAP_R   0x8072

Definition at line 63 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.