Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

lib.res.graphics
(lib.res.graphics globals)

   in cursor.h
   in ogl_shader.h
   in ogl_tex.h
   in tex.h
   in tex_codec.h
   in tex_internal.h
   in unifont.h
   in ogl_shader.h
   in tex.h
   in unifont.h
   in cursor.cpp
   in tex.cpp
   in tex_bmp.cpp
   in tex_codec.cpp
   in tex_dds.cpp
   in tex_jpg.cpp
   in cursor.cpp
   in ogl_shader.cpp
   in ogl_tex.cpp
   in tex.cpp
   in tex_bmp.cpp
   in tex_codec.cpp
   in tex_dds.cpp
   in tex_jpg.cpp
   in tex_png.cpp
   in tex_tga.cpp
   in unifont.cpp

(lib.res.graphics globals)


Field Summary
 static glyphmap_id* BoundGlyphs
          See unifont.cpp
 static const TexCodecVTbl* codecs
          ========================================================================= File : tex_codec.
 static GLint default_filter
          See ogl_tex.cpp
 static uint default_q_flags
          See ogl_tex.cpp
 static int global_orientation
          See tex.cpp
 static int have_auto_mipmap_gen
          See ogl_tex.cpp
 static int have_s3tc
          See ogl_tex.cpp
 const int TEX_BASE_LEVEL_ONLY
          special value for levels_to_skip: the callback will only be called for the base mipmap level (i.e. 100%)
 
Method Summary
 static inline uint access_bit_tbl( u32 tbl, uint idx, uint bit_width )
          See tex_dds.cpp
 static inline uint access_bit_tbl64( u64 tbl, uint idx, uint bit_width )
          See tex_dds.cpp
 static void add_level_size( uint UNUSED( level ), uint UNUSED( level_w ), uint UNUSED( level_h ), const u8* RESTRICT UNUSED( level_data ), size_t level_data_size, void* RESTRICT ctx )
          See tex.cpp
 static LibError add_mipmaps( Tex* t, uint w, uint h, uint bpp, void* new_data, size_t data_size )
          See tex.cpp
 static LibError bmp_decode( DynArray* RESTRICT da, Tex* RESTRICT t )
          See tex_bmp.cpp
 static LibError bmp_encode( Tex* RESTRICT t, DynArray* RESTRICT da )
          See tex_bmp.cpp
 static size_t bmp_hdr_size( const u8* file )
          See tex_bmp.cpp
 static bool bmp_is_ext( const char* ext )
          See tex_bmp.cpp
 static bool bmp_is_hdr( const u8* file )
          See tex_bmp.cpp
 static LibError bmp_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) )
          See tex_bmp.cpp
  cassert( sizeof( JOCTET )== 1&& CHAR_BIT == 8 )
          ========================================================================= File : tex_jpg.
 static GLint choose_fmt( uint bpp, uint flags )
          See ogl_tex.cpp
 static GLint choose_int_fmt( GLenum fmt, uint q_flags )
          See ogl_tex.cpp
 static void create_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx )
          See tex.cpp
 LibError cursor_draw( const char* name, int x, int y )
          See cursor.cpp
 static void Cursor_dtor( Cursor* c )
          See cursor.cpp
 static LibError cursor_free( Handle& h )
          See cursor.cpp
 static void Cursor_init( Cursor* UNUSED( c ), va_list UNUSED( args ) )
          See cursor.cpp
 static Handle cursor_load( const char* name )
          See cursor.cpp
 static LibError Cursor_reload( Cursor* c, const char* name, Handle )
          See cursor.cpp
 static LibError Cursor_to_string( const Cursor* c, char* buf )
          See cursor.cpp
 static LibError Cursor_validate( const Cursor* c )
          See cursor.cpp
 static LibError dds_decode( DynArray* RESTRICT da, Tex* RESTRICT t )
          See tex_dds.cpp
 static LibError dds_encode( Tex* RESTRICT UNUSED( t ), DynArray* RESTRICT UNUSED( da ) )
          See tex_dds.cpp
 static size_t dds_hdr_size( const u8* UNUSED( file ) )
          See tex_dds.cpp
 static bool dds_is_ext( const char* ext )
          See tex_dds.cpp
 static bool dds_is_hdr( const u8* file )
          See tex_dds.cpp
 static LibError dds_transform( Tex* t, uint transforms )
          See tex_dds.cpp
 static LibError decode_pf( const DDPIXELFORMAT* pf, uint* bpp_, uint* flags_ )
          See tex_dds.cpp
 static LibError decode_sd( const DDSURFACEDESC2* sd, uint* w_, uint* h_, uint* bpp_, uint* flags_ )
          See tex_dds.cpp
 static void detect_gl_upload_caps()
          See ogl_tex.cpp
 static LibError do_load_shader( Ogl_Program* p, const char* filename, Handle UNUSED( h ), const CXeromyces& XeroFile, const XMBElement& Shader )
          See ogl_shader.cpp
 METHODDEF( boolean ) dst_empty_output_buffer( j_compress_ptr cinfo )
          See tex_jpg.cpp
 METHODDEF( void ) dst_init( j_compress_ptr cinfo )
          See tex_jpg.cpp
 GLOBAL( void ) dst_prepare( j_compress_ptr cinfo, DynArray* da )
          See tex_jpg.cpp
 METHODDEF( void ) dst_term( j_compress_ptr cinfo )
          See tex_jpg.cpp
 METHODDEF( void ) err_error_exit( j_common_ptr cinfo )
          See tex_jpg.cpp
 METHODDEF( void ) err_output_message( j_common_ptr cinfo )
          See tex_jpg.cpp
  ERROR_ASSOCIATE( ERR::SHDR_NO_SHADER,"Invalid shader reference",-1 )
          See ogl_shader.cpp
  ERROR_ASSOCIATE( ERR::SHDR_COMPILE,"Shader compile failed",-1 )
          See ogl_shader.cpp
  ERROR_ASSOCIATE( ERR::SHDR_LINK,"Shader linking failed",-1 )
          See ogl_shader.cpp
  ERROR_ASSOCIATE( ERR::SHDR_CREATE,"Shader creation failed",-1 )
          ========================================================================= File : ogl_shader.
  ERROR_ASSOCIATE( ERR::SHDR_NO_PROGRAM,"Invalid shader program reference",-1 )
          See ogl_shader.cpp
  ERROR_ASSOCIATE( INFO::TEX_CODEC_CANNOT_HANDLE,"Texture codec cannot handle the given format",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_INVALID_SIZE,"Texture size is incorrect",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( WARN::TEX_INVALID_DATA,"Warning: invalid texel data encountered",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_COMPRESSED,"Unsupported texture compression",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_INVALID_LAYOUT,"Unsupported texel layout, e.g. right-to-left",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_NOT_8BIT_PRECISION,"Not 8-bit channel precision",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_INVALID_COLOR_TYPE,"Invalid color type",-1 )
          See tex.cpp
  ERROR_ASSOCIATE( ERR::TEX_FMT_INVALID,"Invalid/unsupported texture format",-1 )
          ========================================================================= File : tex.
 static void file_buf_dtor( void* p, size_t UNUSED( size ), uintptr_t UNUSED( ctx ) )
          See tex.cpp
 static bool filter_uses_mipmaps( GLint filter )
          See ogl_tex.cpp
 static bool filter_valid( GLint filter )
          ========================================================================= File : ogl_tex.
 static void flip_to_global_orientation( Tex* t )
          See tex.cpp
 static bool fmt_is_s3tc( GLenum fmt )
          See ogl_tex.cpp
 static LibError get_mipmaps( Tex* t, GLint filter, uint q_flags, int* plevels_to_skip )
          See ogl_tex.cpp
 void glvwprintf( const wchar_t* fmt, va_list args )
          See unifont.cpp
 void glwprintf( const wchar_t* fmt,... )
          See unifont.cpp
  H_TYPE_DEFINE( Cursor )
          See cursor.cpp
  H_TYPE_DEFINE( UniFont )
          See unifont.cpp
  H_TYPE_DEFINE( Ogl_Program )
          See ogl_shader.cpp
  H_TYPE_DEFINE( Ogl_Shader )
          See ogl_shader.cpp
  H_TYPE_DEFINE( OglTex )
          See ogl_tex.cpp
 static void io_flush( png_structp UNUSED( png_ptr ) )
          See tex_png.cpp
 static void io_read( png_struct* png_ptr, u8* data, png_size_t length )
          ========================================================================= File : tex_png.
 static void io_write( png_struct* png_ptr, u8* data, png_size_t length )
          See tex_png.cpp
 static bool is_valid_dxt( uint dxt )
          See tex_dds.cpp
 static LibError jpg_decode( DynArray* RESTRICT da, Tex* RESTRICT t )
          See tex_jpg.cpp
 static LibError jpg_decode_impl( DynArray* da, jpeg_decompress_struct* cinfo, Handle& img_hm, RowArray& rows, Tex* t )
          See tex_jpg.cpp
 static LibError jpg_encode( Tex* RESTRICT t, DynArray* RESTRICT da )
          See tex_jpg.cpp
 static LibError jpg_encode_impl( Tex* t, jpeg_compress_struct* cinfo, RowArray& rows, DynArray* da )
          See tex_jpg.cpp
 static size_t jpg_hdr_size( const u8* UNUSED( file ) )
          See tex_jpg.cpp
 static bool jpg_is_ext( const char* ext )
          See tex_jpg.cpp
 static bool jpg_is_hdr( const u8* file )
          See tex_jpg.cpp
 static LibError jpg_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) )
          See tex_jpg.cpp
 static void* load_empty_sys_cursor()
          ========================================================================= File : cursor.
 static void* load_sys_cursor( const char* filename, int hx, int hy )
          See cursor.cpp
 static void make_room_in_buffer( j_compress_ptr cinfo )
          See tex_jpg.cpp
 static inline void mix_2_3( uint dst[ 4], uint c0[ 4], uint c1[ 4] )
          See tex_dds.cpp
 static inline void mix_avg( uint dst[ 4], uint c0[ 4], uint c1[ 4] )
          See tex_dds.cpp
 static void Ogl_Program_dtor( Ogl_Program* p )
          See ogl_shader.cpp
 void ogl_program_free( Handle& h )
          See ogl_shader.cpp
 GLint ogl_program_get_attrib_location( Handle h, const char* name )
          See ogl_shader.cpp
 GLint ogl_program_get_uniform_location( Handle h, const char* name )
          See ogl_shader.cpp
 static void Ogl_Program_init( Ogl_Program* UNUSED( p ), va_list UNUSED( args ) )
          See ogl_shader.cpp
 Handle ogl_program_load( const char* fn )
          See ogl_shader.cpp
 static LibError Ogl_Program_reload( Ogl_Program* p, const char* filename, Handle h )
          See ogl_shader.cpp
 static LibError Ogl_Program_to_string( const Ogl_Program* UNUSED( p ), char* buf )
          See ogl_shader.cpp
 LibError ogl_program_use( Handle h )
          See ogl_shader.cpp
 static LibError Ogl_Program_validate( const Ogl_Program* UNUSED( p ) )
          See ogl_shader.cpp
 LibError ogl_shader_attach( GLhandleARB program, Handle& h )
          See ogl_shader.cpp
 static void Ogl_Shader_dtor( Ogl_Shader* shdr )
          See ogl_shader.cpp
 void ogl_shader_free( Handle& h )
          See ogl_shader.cpp
 static void Ogl_Shader_init( Ogl_Shader* shdr, va_list args )
          See ogl_shader.cpp
 Handle ogl_shader_load( const char* fn, GLenum type )
          See ogl_shader.cpp
 static LibError Ogl_Shader_reload( Ogl_Shader* shdr, const char* filename, Handle UNUSED( h ) )
          See ogl_shader.cpp
 static LibError Ogl_Shader_to_string( const Ogl_Shader* UNUSED( shdr ), char* buf )
          See ogl_shader.cpp
 static LibError Ogl_Shader_validate( const Ogl_Shader* UNUSED( shdr ) )
          See ogl_shader.cpp
 LibError ogl_tex_bind( Handle ht, uint unit )
          See ogl_tex.cpp
 Handle ogl_tex_find( const char* fn )
          See ogl_tex.cpp
 LibError ogl_tex_free( Handle& ht )
          See ogl_tex.cpp
 LibError ogl_tex_get_data( Handle ht, void** p )
          See ogl_tex.cpp
 LibError ogl_tex_get_format( Handle ht, uint* flags, GLenum* fmt )
          See ogl_tex.cpp
 LibError ogl_tex_get_size( Handle ht, uint* w, uint* h, uint* bpp )
          See ogl_tex.cpp
 Handle ogl_tex_load( const char* fn, uint flags )
          See ogl_tex.cpp
 void ogl_tex_override( OglTexOverrides what, OglTexAllow allow )
          See ogl_tex.cpp
 void ogl_tex_set_defaults( uint q_flags, GLint filter )
          See ogl_tex.cpp
 LibError ogl_tex_set_filter( Handle ht, GLint filter )
          See ogl_tex.cpp
 LibError ogl_tex_set_wrap( Handle ht, GLint wrap )
          See ogl_tex.cpp
 LibError ogl_tex_transform( Handle ht, uint transforms )
          See ogl_tex.cpp
 LibError ogl_tex_transform_to( Handle ht, uint new_flags )
          See ogl_tex.cpp
 LibError ogl_tex_upload( const Handle ht, GLenum fmt_ovr, uint q_flags_ovr, GLint int_fmt_ovr )
          See ogl_tex.cpp
 Handle ogl_tex_wrap( Tex* t, const char* fn, uint flags )
          See ogl_tex.cpp
 static void OglTex_dtor( OglTex* ot )
          See ogl_tex.cpp
 static void OglTex_init( OglTex* ot, va_list args )
          See ogl_tex.cpp
 static LibError OglTex_reload( OglTex* ot, const char* fn, Handle h )
          See ogl_tex.cpp
 static LibError OglTex_to_string( const OglTex* ot, char* buf )
          See ogl_tex.cpp
 static LibError OglTex_validate( const OglTex* ot )
          See ogl_tex.cpp
 static LibError plain_transform( Tex* t, uint transforms )
          See tex.cpp
 static LibError png_decode( DynArray* RESTRICT da, Tex* RESTRICT t )
          See tex_png.cpp
 static LibError png_decode_impl( DynArray* da, png_structp png_ptr, png_infop info_ptr, Handle& img_hm, RowArray& rows, Tex* t )
          See tex_png.cpp
 static LibError png_encode( Tex* RESTRICT t, DynArray* RESTRICT da )
          See tex_png.cpp
 static LibError png_encode_impl( Tex* t, png_structp png_ptr, png_infop info_ptr, RowArray& rows, DynArray* da )
          See tex_png.cpp
 static size_t png_hdr_size( const u8* UNUSED( file ) )
          See tex_png.cpp
 static bool png_is_ext( const char* ext )
          See tex_png.cpp
 static bool png_is_hdr( const u8* file )
          See tex_png.cpp
 static LibError png_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) )
          See tex_png.cpp
 static bool q_flags_valid( uint q_flags )
          See ogl_tex.cpp
 static LibError s3tc_decompress( Tex* t )
          See tex_dds.cpp
 static void s3tc_decompress_level( uint UNUSED( level ), uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx )
          See tex_dds.cpp
 static void s3tc_precalc_alpha( uint dxt, const u8* RESTRICT a_block, S3tcBlock* RESTRICT b )
          See tex_dds.cpp
 static void s3tc_precalc_block( uint dxt, const u8* RESTRICT block, S3tcBlock* RESTRICT b )
          See tex_dds.cpp
 static void s3tc_precalc_color( uint dxt, const u8* RESTRICT c_block, S3tcBlock* RESTRICT b )
          See tex_dds.cpp
 static void s3tc_write_pixel( const S3tcBlock* RESTRICT b, uint pixel_idx, u8* RESTRICT out )
          See tex_dds.cpp
 static const char* shader_type_to_string( GLenum type, char* buf, size_t buflen )
          See ogl_shader.cpp
 METHODDEF( boolean ) src_fill_buffer( j_decompress_ptr cinfo )
          See tex_jpg.cpp
 METHODDEF( void ) src_init( j_decompress_ptr UNUSED( cinfo ) )
          See tex_jpg.cpp
 GLOBAL( void ) src_prepare( j_decompress_ptr cinfo, DynArray* da )
          See tex_jpg.cpp
 METHODDEF( void ) src_skip_data( j_decompress_ptr cinfo, long num_bytes )
          See tex_jpg.cpp
 METHODDEF( void ) src_term( j_decompress_ptr UNUSED( cinfo ) )
          See tex_jpg.cpp
 static void state_latch( OglTexState* ots )
          See ogl_tex.cpp
 static void state_set_to_defaults( OglTexState* ots )
          See ogl_tex.cpp
 static GLenum string_to_shader_type( const char* name )
          See ogl_shader.cpp
 LibError tex_codec_alloc_rows( const u8* data, size_t h, size_t pitch, uint src_flags, uint dst_orientation, RowArray& rows )
          See tex_codec.cpp
 LibError tex_codec_for_filename( const char* fn, const TexCodecVTbl** c )
          See tex_codec.cpp
 LibError tex_codec_for_header( const u8* file, size_t file_size, const TexCodecVTbl** c )
          See tex_codec.cpp
 const TexCodecVTbl* tex_codec_next( const TexCodecVTbl* prev_codec )
          See tex_codec.cpp
 int tex_codec_register( TexCodecVTbl* c )
          See tex_codec.cpp
  TEX_CODEC_REGISTER( dds )
          See tex_dds.cpp
  TEX_CODEC_REGISTER( bmp )
          See tex_bmp.cpp
  TEX_CODEC_REGISTER( tga )
          See tex_tga.cpp
  TEX_CODEC_REGISTER( png )
          See tex_png.cpp
  TEX_CODEC_REGISTER( jpg )
          See tex_jpg.cpp
 void tex_codec_register_all()
          See tex_codec.cpp
 LibError tex_codec_transform( Tex* t, uint transforms )
          See tex_codec.cpp
 LibError tex_codec_write( Tex* t, uint transforms, const void* hdr, size_t hdr_size, DynArray* da )
          See tex_codec.cpp
 LibError tex_decode( const u8* data, size_t data_size, MEM_DTOR dtor, Tex* t )
          See tex.cpp
 LibError tex_encode( Tex* t, const char* fn, DynArray* da )
          See tex.cpp
 LibError tex_free( Tex* t )
          See tex.cpp
 u8* tex_get_data( const Tex* t )
          See tex.cpp
 size_t tex_hdr_size( const char* fn )
          See tex.cpp
 size_t tex_img_size( const Tex* t )
          See tex.cpp
 bool tex_is_known_extension( const char* filename )
          See tex.cpp
 LibError tex_load( const char* fn, Tex* t, uint file_flags )
          See tex.cpp
 bool tex_orientations_match( uint src_flags, uint dst_orientation )
          See tex.cpp
 void tex_set_global_orientation( int o )
          See tex.cpp
 LibError tex_transform( Tex* t, uint transforms )
          See tex.cpp
 LibError tex_transform_to( Tex* t, uint new_flags )
          See tex.cpp
 void tex_util_foreach_mipmap( uint w, uint h, uint bpp, const u8* RESTRICT data, int levels_to_skip, uint data_padding, MipmapCB cb, void* RESTRICT ctx )
          See tex.cpp
 LibError tex_validate( const Tex* t )
          See tex.cpp
 LibError tex_validate_plain_format( uint bpp, uint flags )
          See tex.cpp
 LibError tex_wrap( uint w, uint h, uint bpp, uint flags, void* img, Tex* t )
          See tex.cpp
 LibError tex_write( Tex* t, const char* fn )
          See tex.cpp
 static LibError tga_decode( DynArray* RESTRICT da, Tex* RESTRICT t )
          See tex_tga.cpp
 static LibError tga_encode( Tex* RESTRICT t, DynArray* RESTRICT da )
          See tex_tga.cpp
 static size_t tga_hdr_size( const u8* file )
          See tex_tga.cpp
 static bool tga_is_ext( const char* ext )
          See tex_tga.cpp
 static bool tga_is_hdr( const u8* file )
          See tex_tga.cpp
 static LibError tga_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) )
          See tex_tga.cpp
  TIMER_ADD_CLIENT( tc_transform )
          See tex.cpp
  TIMER_ADD_CLIENT( tc_png_decode )
          See tex_png.cpp
  TIMER_ADD_CLIENT( tc_plain_transform )
          See tex.cpp
 LibError unifont_bind( const Handle h )
          See unifont.cpp
 int unifont_character_width( const Handle h, wchar_t c )
          See unifont.cpp
 static void UniFont_dtor( UniFont* f )
          See unifont.cpp
 int unifont_height( const Handle h )
          See unifont.cpp
 static void UniFont_init( UniFont* UNUSED( f ), va_list UNUSED( args ) )
          See unifont.cpp
 int unifont_linespacing( const Handle h )
          See unifont.cpp
 Handle unifont_load( const char* fn, uint flags )
          See unifont.cpp
 static LibError UniFont_reload( UniFont* f, const char* fn, Handle UNUSED( h ) )
          See unifont.cpp
 LibError unifont_stringsize( const Handle h, const wchar_t* text, int& width, int& height )
          See unifont.cpp
 static LibError UniFont_to_string( const UniFont* f, char* buf )
          See unifont.cpp
 LibError unifont_unload( Handle& h )
          See unifont.cpp
 static LibError UniFont_validate( const UniFont* f )
          See unifont.cpp
 static inline uint unpack_to_8( u16 c, uint bits_below, uint num_bits )
          See tex_dds.cpp
 static void upload_compressed_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx )
          See ogl_tex.cpp
 static void upload_impl( Tex* t, GLenum fmt, GLint int_fmt, int levels_to_skip )
          See ogl_tex.cpp
 static void upload_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t UNUSED( level_data_size ), void* RESTRICT ctx )
          See ogl_tex.cpp
 static void warn_if_uploaded( Handle ht, const OglTex* ot )
          See ogl_tex.cpp
 static bool wrap_valid( GLint wrap )
          See ogl_tex.cpp
 
Symbol Summary
 #define ALLOW_SYS_CURSOR 0
          See cursor.cpp
 #define BI_RGB 0
          See tex_bmp.cpp
 #define DDPF_ALPHAPIXELS 0x00000001
          See tex_dds.cpp
 #define DDPF_FOURCC 0x00000004
          See tex_dds.cpp
 #define DDPF_RGB 0x00000040
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP 0x00000200
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
          See tex_dds.cpp
 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
          See tex_dds.cpp
 #define DDSCAPS2_VOLUME 0x00200000
          See tex_dds.cpp
 #define DDSCAPS_COMPLEX 0x00000008
          See tex_dds.cpp
 #define DDSCAPS_MIPMAP 0x00400000
          See tex_dds.cpp
 #define DDSCAPS_TEXTURE 0x00001000
          See tex_dds.cpp
 #define DDSD_CAPS 0x00000001
          See tex_dds.cpp
 #define DDSD_DEPTH 0x00800000
          See tex_dds.cpp
 #define DDSD_HEIGHT 0x00000002
          See tex_dds.cpp
 #define DDSD_LINEARSIZE 0x00080000
          See tex_dds.cpp
 #define DDSD_MIPMAPCOUNT 0x00020000
          See tex_dds.cpp
 #define DDSD_PITCH 0x00000008
          See tex_dds.cpp
 #define DDSD_PIXELFORMAT 0x00001000
          See tex_dds.cpp
 #define DDSD_WIDTH 0x00000004
          See tex_dds.cpp
 #define INCLUDED_GRAPHICS_CURSOR
          See cursor.h
 #define INCLUDED_OGL_SHADER
          See ogl_shader.h
 #define INCLUDED_OGL_TEX
          See ogl_tex.h
 #define INCLUDED_TEX
          See tex.h
 #define INCLUDED_TEX_CODEC
          See tex_codec.h
 #define INCLUDED_TEX_INTERNAL
          See tex_internal.h
 #define INCLUDED_UNIFONT
          See unifont.h
 #define OUTPUT_BUF_SIZE 64*KiB
          See tex_jpg.cpp
 
Macro Summary
 #define CHECK_TEX(t) RETURN_ERR(tex_validate(t))
          See tex.cpp
 #define REGISTER_CODEC(name) extern void name##_register() name##_register()
          See tex_codec.cpp
 #define TEX_CODEC_REGISTER(namestatic) TexCodecVTbl vtbl = {name##_decode, name##_encode, name##_transform,name##_is_hdr, name##_is_ext, name##_hdr_size,#name}void name##_register() { tex_codec_register(&vtbl) }
          build codec vtbl and register it.
 

Field Detail

BoundGlyphs

 static glyphmap_id* BoundGlyphs;
See unifont.cpp.

codecs

 static const TexCodecVTbl* codecs;
========================================================================= File : tex_codec.cpp Project : 0 A.D. Description : support routines for texture codecs =========================================================================
See tex_codec.cpp.

default_filter

 static GLint default_filter;
See ogl_tex.cpp.

default_q_flags

 static uint default_q_flags;
See ogl_tex.cpp.

global_orientation

 static int global_orientation;
See tex.cpp.

have_auto_mipmap_gen

 static int have_auto_mipmap_gen;
See ogl_tex.cpp.

have_s3tc

 static int have_s3tc;
See ogl_tex.cpp.

TEX_BASE_LEVEL_ONLY

 const int TEX_BASE_LEVEL_ONLY;
special value for levels_to_skip: the callback will only be called for the base mipmap level (i.e. 100%)
See tex.h.


Method Detail

access_bit_tbl

 static inline uint access_bit_tbl( u32 tbl, uint idx, uint bit_width );
See tex_dds.cpp.

access_bit_tbl64

 static inline uint access_bit_tbl64( u64 tbl, uint idx, uint bit_width );
See tex_dds.cpp.

add_level_size

 static void add_level_size( uint UNUSED( level ), uint UNUSED( level_w ), uint UNUSED( level_h ), const u8* RESTRICT UNUSED( level_data ), size_t level_data_size, void* RESTRICT ctx );
See tex.cpp.

add_mipmaps

 static LibError add_mipmaps( Tex* t, uint w, uint h, uint bpp, void* new_data, size_t data_size );
See tex.cpp.

bmp_decode

 static LibError bmp_decode( DynArray* RESTRICT da, Tex* RESTRICT t );
See tex_bmp.cpp.

bmp_encode

 static LibError bmp_encode( Tex* RESTRICT t, DynArray* RESTRICT da );
See tex_bmp.cpp.

bmp_hdr_size

 static size_t bmp_hdr_size( const u8* file );
See tex_bmp.cpp.

bmp_is_ext

 static bool bmp_is_ext( const char* ext );
See tex_bmp.cpp.

bmp_is_hdr

 static bool bmp_is_hdr( const u8* file );
See tex_bmp.cpp.

bmp_transform

 static LibError bmp_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) );
See tex_bmp.cpp.

cassert

 cassert( sizeof( JOCTET )== 1&& CHAR_BIT == 8 );
========================================================================= File : tex_jpg.cpp Project : 0 A.D. Description : JPEG codec using IJG jpeglib. =========================================================================
See tex_jpg.cpp.

choose_fmt

 static GLint choose_fmt( uint bpp, uint flags );
See ogl_tex.cpp.

choose_int_fmt

 static GLint choose_int_fmt( GLenum fmt, uint q_flags );
See ogl_tex.cpp.

create_level

 static void create_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx );
See tex.cpp.

cursor_draw

 LibError cursor_draw( const char* name, int x, int y );
See cursor.cpp.

Cursor_dtor

 static void Cursor_dtor( Cursor* c );
See cursor.cpp.

cursor_free

 static LibError cursor_free( Handle& h );
See cursor.cpp.

Cursor_init

 static void Cursor_init( Cursor* UNUSED( c ), va_list UNUSED( args ) );
See cursor.cpp.

cursor_load

 static Handle cursor_load( const char* name );
See cursor.cpp.

Cursor_reload

 static LibError Cursor_reload( Cursor* c, const char* name, Handle );
See cursor.cpp.

Cursor_to_string

 static LibError Cursor_to_string( const Cursor* c, char* buf );
See cursor.cpp.

Cursor_validate

 static LibError Cursor_validate( const Cursor* c );
See cursor.cpp.

dds_decode

 static LibError dds_decode( DynArray* RESTRICT da, Tex* RESTRICT t );
See tex_dds.cpp.

dds_encode

 static LibError dds_encode( Tex* RESTRICT UNUSED( t ), DynArray* RESTRICT UNUSED( da ) );
See tex_dds.cpp.

dds_hdr_size

 static size_t dds_hdr_size( const u8* UNUSED( file ) );
See tex_dds.cpp.

dds_is_ext

 static bool dds_is_ext( const char* ext );
See tex_dds.cpp.

dds_is_hdr

 static bool dds_is_hdr( const u8* file );
See tex_dds.cpp.

dds_transform

 static LibError dds_transform( Tex* t, uint transforms );
See tex_dds.cpp.

decode_pf

 static LibError decode_pf( const DDPIXELFORMAT* pf, uint* bpp_, uint* flags_ );
See tex_dds.cpp.

decode_sd

 static LibError decode_sd( const DDSURFACEDESC2* sd, uint* w_, uint* h_, uint* bpp_, uint* flags_ );
See tex_dds.cpp.

detect_gl_upload_caps

 static void detect_gl_upload_caps();
See ogl_tex.cpp.

do_load_shader

 static LibError do_load_shader( Ogl_Program* p, const char* filename, Handle UNUSED( h ), const CXeromyces& XeroFile, const XMBElement& Shader );
See ogl_shader.cpp.

dst_empty_output_buffer

 METHODDEF( boolean ) dst_empty_output_buffer( j_compress_ptr cinfo );
See tex_jpg.cpp.

dst_init

 METHODDEF( void ) dst_init( j_compress_ptr cinfo );
See tex_jpg.cpp.

dst_prepare

 GLOBAL( void ) dst_prepare( j_compress_ptr cinfo, DynArray* da );
See tex_jpg.cpp.

dst_term

 METHODDEF( void ) dst_term( j_compress_ptr cinfo );
See tex_jpg.cpp.

err_error_exit

 METHODDEF( void ) err_error_exit( j_common_ptr cinfo );
See tex_jpg.cpp.

err_output_message

 METHODDEF( void ) err_output_message( j_common_ptr cinfo );
See tex_jpg.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::SHDR_NO_SHADER,"Invalid shader reference",-1 );
See ogl_shader.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::SHDR_COMPILE,"Shader compile failed",-1 );
See ogl_shader.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::SHDR_LINK,"Shader linking failed",-1 );
See ogl_shader.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::SHDR_CREATE,"Shader creation failed",-1 );
========================================================================= File : ogl_shader.cpp Project : 0 A.D. Description : load and link together shaders; provides hotload support. =========================================================================
See ogl_shader.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::SHDR_NO_PROGRAM,"Invalid shader program reference",-1 );
See ogl_shader.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( INFO::TEX_CODEC_CANNOT_HANDLE,"Texture codec cannot handle the given format",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_INVALID_SIZE,"Texture size is incorrect",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( WARN::TEX_INVALID_DATA,"Warning: invalid texel data encountered",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_COMPRESSED,"Unsupported texture compression",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_INVALID_LAYOUT,"Unsupported texel layout, e.g. right-to-left",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_NOT_8BIT_PRECISION,"Not 8-bit channel precision",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_INVALID_COLOR_TYPE,"Invalid color type",-1 );
See tex.cpp.

ERROR_ASSOCIATE

 ERROR_ASSOCIATE( ERR::TEX_FMT_INVALID,"Invalid/unsupported texture format",-1 );
========================================================================= File : tex.cpp Project : 0 A.D. Description : support routines for 2d texture access/writing. =========================================================================
See tex.cpp.

file_buf_dtor

 static void file_buf_dtor( void* p, size_t UNUSED( size ), uintptr_t UNUSED( ctx ) );
See tex.cpp.

filter_uses_mipmaps

 static bool filter_uses_mipmaps( GLint filter );
See ogl_tex.cpp.

filter_valid

 static bool filter_valid( GLint filter );
========================================================================= File : ogl_tex.cpp Project : 0 A.D. Description : wrapper for all OpenGL texturing calls. : provides caching, hotloading and lifetime management. =========================================================================
See ogl_tex.cpp.

flip_to_global_orientation

 static void flip_to_global_orientation( Tex* t );
See tex.cpp.

fmt_is_s3tc

 static bool fmt_is_s3tc( GLenum fmt );
See ogl_tex.cpp.

get_mipmaps

 static LibError get_mipmaps( Tex* t, GLint filter, uint q_flags, int* plevels_to_skip );
See ogl_tex.cpp.

glvwprintf

 void glvwprintf( const wchar_t* fmt, va_list args );
See unifont.cpp.

glwprintf

 void glwprintf( const wchar_t* fmt,... );
See unifont.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( Cursor );
See cursor.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( UniFont );
See unifont.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( Ogl_Program );
See ogl_shader.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( Ogl_Shader );
See ogl_shader.cpp.

H_TYPE_DEFINE

 H_TYPE_DEFINE( OglTex );
See ogl_tex.cpp.

io_flush

 static void io_flush( png_structp UNUSED( png_ptr ) );
See tex_png.cpp.

io_read

 static void io_read( png_struct* png_ptr, u8* data, png_size_t length );
========================================================================= File : tex_png.cpp Project : 0 A.D. Description : PNG codec using libpng. =========================================================================
See tex_png.cpp.

io_write

 static void io_write( png_struct* png_ptr, u8* data, png_size_t length );
See tex_png.cpp.

is_valid_dxt

 static bool is_valid_dxt( uint dxt );
See tex_dds.cpp.

jpg_decode

 static LibError jpg_decode( DynArray* RESTRICT da, Tex* RESTRICT t );
See tex_jpg.cpp.

jpg_decode_impl

 static LibError jpg_decode_impl( DynArray* da, jpeg_decompress_struct* cinfo, Handle& img_hm, RowArray& rows, Tex* t );
See tex_jpg.cpp.

jpg_encode

 static LibError jpg_encode( Tex* RESTRICT t, DynArray* RESTRICT da );
See tex_jpg.cpp.

jpg_encode_impl

 static LibError jpg_encode_impl( Tex* t, jpeg_compress_struct* cinfo, RowArray& rows, DynArray* da );
See tex_jpg.cpp.

jpg_hdr_size

 static size_t jpg_hdr_size( const u8* UNUSED( file ) );
See tex_jpg.cpp.

jpg_is_ext

 static bool jpg_is_ext( const char* ext );
See tex_jpg.cpp.

jpg_is_hdr

 static bool jpg_is_hdr( const u8* file );
See tex_jpg.cpp.

jpg_transform

 static LibError jpg_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) );
See tex_jpg.cpp.

load_empty_sys_cursor

 static void* load_empty_sys_cursor();
========================================================================= File : cursor.cpp Project : 0 A.D. Description : mouse cursors (either via OpenGL texture or hardware) =========================================================================
See cursor.cpp.

load_sys_cursor

 static void* load_sys_cursor( const char* filename, int hx, int hy );
See cursor.cpp.

make_room_in_buffer

 static void make_room_in_buffer( j_compress_ptr cinfo );
See tex_jpg.cpp.

mix_2_3

 static inline void mix_2_3( uint dst[ 4], uint c0[ 4], uint c1[ 4] );
See tex_dds.cpp.

mix_avg

 static inline void mix_avg( uint dst[ 4], uint c0[ 4], uint c1[ 4] );
See tex_dds.cpp.

Ogl_Program_dtor

 static void Ogl_Program_dtor( Ogl_Program* p );
See ogl_shader.cpp.

ogl_program_free

 void ogl_program_free( Handle& h );
See ogl_shader.cpp.

ogl_program_get_attrib_location

 GLint ogl_program_get_attrib_location( Handle h, const char* name );
See ogl_shader.cpp.

ogl_program_get_uniform_location

 GLint ogl_program_get_uniform_location( Handle h, const char* name );
See ogl_shader.cpp.

Ogl_Program_init

 static void Ogl_Program_init( Ogl_Program* UNUSED( p ), va_list UNUSED( args ) );
See ogl_shader.cpp.

ogl_program_load

 Handle ogl_program_load( const char* fn );
See ogl_shader.cpp.

Ogl_Program_reload

 static LibError Ogl_Program_reload( Ogl_Program* p, const char* filename, Handle h );
See ogl_shader.cpp.

Ogl_Program_to_string

 static LibError Ogl_Program_to_string( const Ogl_Program* UNUSED( p ), char* buf );
See ogl_shader.cpp.

ogl_program_use

 LibError ogl_program_use( Handle h );
See ogl_shader.cpp.

Ogl_Program_validate

 static LibError Ogl_Program_validate( const Ogl_Program* UNUSED( p ) );
See ogl_shader.cpp.

ogl_shader_attach

 LibError ogl_shader_attach( GLhandleARB program, Handle& h );
See ogl_shader.cpp.

Ogl_Shader_dtor

 static void Ogl_Shader_dtor( Ogl_Shader* shdr );
See ogl_shader.cpp.

ogl_shader_free

 void ogl_shader_free( Handle& h );
See ogl_shader.cpp.

Ogl_Shader_init

 static void Ogl_Shader_init( Ogl_Shader* shdr, va_list args );
See ogl_shader.cpp.

ogl_shader_load

 Handle ogl_shader_load( const char* fn, GLenum type );
See ogl_shader.cpp.

Ogl_Shader_reload

 static LibError Ogl_Shader_reload( Ogl_Shader* shdr, const char* filename, Handle UNUSED( h ) );
See ogl_shader.cpp.

Ogl_Shader_to_string

 static LibError Ogl_Shader_to_string( const Ogl_Shader* UNUSED( shdr ), char* buf );
See ogl_shader.cpp.

Ogl_Shader_validate

 static LibError Ogl_Shader_validate( const Ogl_Shader* UNUSED( shdr ) );
See ogl_shader.cpp.

ogl_tex_bind

 LibError ogl_tex_bind( Handle ht, uint unit );
See ogl_tex.cpp.

ogl_tex_find

 Handle ogl_tex_find( const char* fn );
See ogl_tex.cpp.

ogl_tex_free

 LibError ogl_tex_free( Handle& ht );
See ogl_tex.cpp.

ogl_tex_get_data

 LibError ogl_tex_get_data( Handle ht, void** p );
See ogl_tex.cpp.

ogl_tex_get_format

 LibError ogl_tex_get_format( Handle ht, uint* flags, GLenum* fmt );
See ogl_tex.cpp.

ogl_tex_get_size

 LibError ogl_tex_get_size( Handle ht, uint* w, uint* h, uint* bpp );
See ogl_tex.cpp.

ogl_tex_load

 Handle ogl_tex_load( const char* fn, uint flags );
See ogl_tex.cpp.

ogl_tex_override

 void ogl_tex_override( OglTexOverrides what, OglTexAllow allow );
See ogl_tex.cpp.

ogl_tex_set_defaults

 void ogl_tex_set_defaults( uint q_flags, GLint filter );
See ogl_tex.cpp.

ogl_tex_set_filter

 LibError ogl_tex_set_filter( Handle ht, GLint filter );
See ogl_tex.cpp.

ogl_tex_set_wrap

 LibError ogl_tex_set_wrap( Handle ht, GLint wrap );
See ogl_tex.cpp.

ogl_tex_transform

 LibError ogl_tex_transform( Handle ht, uint transforms );
See ogl_tex.cpp.

ogl_tex_transform_to

 LibError ogl_tex_transform_to( Handle ht, uint new_flags );
See ogl_tex.cpp.

ogl_tex_upload

 LibError ogl_tex_upload( const Handle ht, GLenum fmt_ovr, uint q_flags_ovr, GLint int_fmt_ovr );
See ogl_tex.cpp.

ogl_tex_wrap

 Handle ogl_tex_wrap( Tex* t, const char* fn, uint flags );
See ogl_tex.cpp.

OglTex_dtor

 static void OglTex_dtor( OglTex* ot );
See ogl_tex.cpp.

OglTex_init

 static void OglTex_init( OglTex* ot, va_list args );
See ogl_tex.cpp.

OglTex_reload

 static LibError OglTex_reload( OglTex* ot, const char* fn, Handle h );
See ogl_tex.cpp.

OglTex_to_string

 static LibError OglTex_to_string( const OglTex* ot, char* buf );
See ogl_tex.cpp.

OglTex_validate

 static LibError OglTex_validate( const OglTex* ot );
See ogl_tex.cpp.

plain_transform

 static LibError plain_transform( Tex* t, uint transforms );
See tex.cpp.

png_decode

 static LibError png_decode( DynArray* RESTRICT da, Tex* RESTRICT t );
See tex_png.cpp.

png_decode_impl

 static LibError png_decode_impl( DynArray* da, png_structp png_ptr, png_infop info_ptr, Handle& img_hm, RowArray& rows, Tex* t );
See tex_png.cpp.

png_encode

 static LibError png_encode( Tex* RESTRICT t, DynArray* RESTRICT da );
See tex_png.cpp.

png_encode_impl

 static LibError png_encode_impl( Tex* t, png_structp png_ptr, png_infop info_ptr, RowArray& rows, DynArray* da );
See tex_png.cpp.

png_hdr_size

 static size_t png_hdr_size( const u8* UNUSED( file ) );
See tex_png.cpp.

png_is_ext

 static bool png_is_ext( const char* ext );
See tex_png.cpp.

png_is_hdr

 static bool png_is_hdr( const u8* file );
See tex_png.cpp.

png_transform

 static LibError png_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) );
See tex_png.cpp.

q_flags_valid

 static bool q_flags_valid( uint q_flags );
See ogl_tex.cpp.

s3tc_decompress

 static LibError s3tc_decompress( Tex* t );
See tex_dds.cpp.

s3tc_decompress_level

 static void s3tc_decompress_level( uint UNUSED( level ), uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx );
See tex_dds.cpp.

s3tc_precalc_alpha

 static void s3tc_precalc_alpha( uint dxt, const u8* RESTRICT a_block, S3tcBlock* RESTRICT b );
See tex_dds.cpp.

s3tc_precalc_block

 static void s3tc_precalc_block( uint dxt, const u8* RESTRICT block, S3tcBlock* RESTRICT b );
See tex_dds.cpp.

s3tc_precalc_color

 static void s3tc_precalc_color( uint dxt, const u8* RESTRICT c_block, S3tcBlock* RESTRICT b );
See tex_dds.cpp.

s3tc_write_pixel

 static void s3tc_write_pixel( const S3tcBlock* RESTRICT b, uint pixel_idx, u8* RESTRICT out );
See tex_dds.cpp.

shader_type_to_string

 static const char* shader_type_to_string( GLenum type, char* buf, size_t buflen );
See ogl_shader.cpp.

src_fill_buffer

 METHODDEF( boolean ) src_fill_buffer( j_decompress_ptr cinfo );
See tex_jpg.cpp.

src_init

 METHODDEF( void ) src_init( j_decompress_ptr UNUSED( cinfo ) );
See tex_jpg.cpp.

src_prepare

 GLOBAL( void ) src_prepare( j_decompress_ptr cinfo, DynArray* da );
See tex_jpg.cpp.

src_skip_data

 METHODDEF( void ) src_skip_data( j_decompress_ptr cinfo, long num_bytes );
See tex_jpg.cpp.

src_term

 METHODDEF( void ) src_term( j_decompress_ptr UNUSED( cinfo ) );
See tex_jpg.cpp.

state_latch

 static void state_latch( OglTexState* ots );
See ogl_tex.cpp.

state_set_to_defaults

 static void state_set_to_defaults( OglTexState* ots );
See ogl_tex.cpp.

string_to_shader_type

 static GLenum string_to_shader_type( const char* name );
See ogl_shader.cpp.

tex_codec_alloc_rows

 LibError tex_codec_alloc_rows( const u8* data, size_t h, size_t pitch, uint src_flags, uint dst_orientation, RowArray& rows );
See tex_codec.cpp.

tex_codec_for_filename

 LibError tex_codec_for_filename( const char* fn, const TexCodecVTbl** c );
See tex_codec.cpp.

tex_codec_for_header

 LibError tex_codec_for_header( const u8* file, size_t file_size, const TexCodecVTbl** c );
See tex_codec.cpp.

tex_codec_next

 const TexCodecVTbl* tex_codec_next( const TexCodecVTbl* prev_codec );
See tex_codec.cpp.

tex_codec_register

 int tex_codec_register( TexCodecVTbl* c );
See tex_codec.cpp.

TEX_CODEC_REGISTER

 TEX_CODEC_REGISTER( dds );
See tex_dds.cpp.

TEX_CODEC_REGISTER

 TEX_CODEC_REGISTER( bmp );
See tex_bmp.cpp.

TEX_CODEC_REGISTER

 TEX_CODEC_REGISTER( tga );
See tex_tga.cpp.

TEX_CODEC_REGISTER

 TEX_CODEC_REGISTER( png );
See tex_png.cpp.

TEX_CODEC_REGISTER

 TEX_CODEC_REGISTER( jpg );
See tex_jpg.cpp.

tex_codec_register_all

 void tex_codec_register_all();
See tex_codec.cpp.

tex_codec_transform

 LibError tex_codec_transform( Tex* t, uint transforms );
See tex_codec.cpp.

tex_codec_write

 LibError tex_codec_write( Tex* t, uint transforms, const void* hdr, size_t hdr_size, DynArray* da );
See tex_codec.cpp.

tex_decode

 LibError tex_decode( const u8* data, size_t data_size, MEM_DTOR dtor, Tex* t );
See tex.cpp.

tex_encode

 LibError tex_encode( Tex* t, const char* fn, DynArray* da );
See tex.cpp.

tex_free

 LibError tex_free( Tex* t );
See tex.cpp.

tex_get_data

 u8* tex_get_data( const Tex* t );
See tex.cpp.

tex_hdr_size

 size_t tex_hdr_size( const char* fn );
See tex.cpp.

tex_img_size

 size_t tex_img_size( const Tex* t );
See tex.cpp.

tex_is_known_extension

 bool tex_is_known_extension( const char* filename );
See tex.cpp.

tex_load

 LibError tex_load( const char* fn, Tex* t, uint file_flags );
See tex.cpp.

tex_orientations_match

 bool tex_orientations_match( uint src_flags, uint dst_orientation );
See tex.cpp.

tex_set_global_orientation

 void tex_set_global_orientation( int o );
See tex.cpp.

tex_transform

 LibError tex_transform( Tex* t, uint transforms );
See tex.cpp.

tex_transform_to

 LibError tex_transform_to( Tex* t, uint new_flags );
See tex.cpp.

tex_util_foreach_mipmap

 void tex_util_foreach_mipmap( uint w, uint h, uint bpp, const u8* RESTRICT data, int levels_to_skip, uint data_padding, MipmapCB cb, void* RESTRICT ctx );
See tex.cpp.

tex_validate

 LibError tex_validate( const Tex* t );
See tex.cpp.

tex_validate_plain_format

 LibError tex_validate_plain_format( uint bpp, uint flags );
See tex.cpp.

tex_wrap

 LibError tex_wrap( uint w, uint h, uint bpp, uint flags, void* img, Tex* t );
See tex.cpp.

tex_write

 LibError tex_write( Tex* t, const char* fn );
See tex.cpp.

tga_decode

 static LibError tga_decode( DynArray* RESTRICT da, Tex* RESTRICT t );
See tex_tga.cpp.

tga_encode

 static LibError tga_encode( Tex* RESTRICT t, DynArray* RESTRICT da );
See tex_tga.cpp.

tga_hdr_size

 static size_t tga_hdr_size( const u8* file );
See tex_tga.cpp.

tga_is_ext

 static bool tga_is_ext( const char* ext );
See tex_tga.cpp.

tga_is_hdr

 static bool tga_is_hdr( const u8* file );
See tex_tga.cpp.

tga_transform

 static LibError tga_transform( Tex* UNUSED( t ), uint UNUSED( transforms ) );
See tex_tga.cpp.

TIMER_ADD_CLIENT

 TIMER_ADD_CLIENT( tc_transform );
See tex.cpp.

TIMER_ADD_CLIENT

 TIMER_ADD_CLIENT( tc_png_decode );
See tex_png.cpp.

TIMER_ADD_CLIENT

 TIMER_ADD_CLIENT( tc_plain_transform );
See tex.cpp.

unifont_bind

 LibError unifont_bind( const Handle h );
See unifont.cpp.

unifont_character_width

 int unifont_character_width( const Handle h, wchar_t c );
See unifont.cpp.

UniFont_dtor

 static void UniFont_dtor( UniFont* f );
See unifont.cpp.

unifont_height

 int unifont_height( const Handle h );
See unifont.cpp.

UniFont_init

 static void UniFont_init( UniFont* UNUSED( f ), va_list UNUSED( args ) );
See unifont.cpp.

unifont_linespacing

 int unifont_linespacing( const Handle h );
See unifont.cpp.

unifont_load

 Handle unifont_load( const char* fn, uint flags );
See unifont.cpp.

UniFont_reload

 static LibError UniFont_reload( UniFont* f, const char* fn, Handle UNUSED( h ) );
See unifont.cpp.

unifont_stringsize

 LibError unifont_stringsize( const Handle h, const wchar_t* text, int& width, int& height );
See unifont.cpp.

UniFont_to_string

 static LibError UniFont_to_string( const UniFont* f, char* buf );
See unifont.cpp.

unifont_unload

 LibError unifont_unload( Handle& h );
See unifont.cpp.

UniFont_validate

 static LibError UniFont_validate( const UniFont* f );
See unifont.cpp.

unpack_to_8

 static inline uint unpack_to_8( u16 c, uint bits_below, uint num_bits );
See tex_dds.cpp.

upload_compressed_level

 static void upload_compressed_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT ctx );
See ogl_tex.cpp.

upload_impl

 static void upload_impl( Tex* t, GLenum fmt, GLint int_fmt, int levels_to_skip );
See ogl_tex.cpp.

upload_level

 static void upload_level( uint level, uint level_w, uint level_h, const u8* RESTRICT level_data, size_t UNUSED( level_data_size ), void* RESTRICT ctx );
See ogl_tex.cpp.

warn_if_uploaded

 static void warn_if_uploaded( Handle ht, const OglTex* ot );
See ogl_tex.cpp.

wrap_valid

 static bool wrap_valid( GLint wrap );
See ogl_tex.cpp.


Symbol Detail

ALLOW_SYS_CURSOR

 #define ALLOW_SYS_CURSOR 0
See cursor.cpp.

BI_RGB

 #define BI_RGB 0		
See tex_bmp.cpp.

DDPF_ALPHAPIXELS

 #define DDPF_ALPHAPIXELS 0x00000001
See tex_dds.cpp.

DDPF_FOURCC

 #define DDPF_FOURCC 0x00000004
See tex_dds.cpp.

DDPF_RGB

 #define DDPF_RGB 0x00000040
See tex_dds.cpp.

DDSCAPS2_CUBEMAP

 #define DDSCAPS2_CUBEMAP 0x00000200
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_NEGATIVEX

 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_NEGATIVEY

 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_NEGATIVEZ

 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_POSITIVEX

 #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_POSITIVEY

 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000
See tex_dds.cpp.

DDSCAPS2_CUBEMAP_POSITIVEZ

 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000
See tex_dds.cpp.

DDSCAPS2_VOLUME

 #define DDSCAPS2_VOLUME 0x00200000
See tex_dds.cpp.

DDSCAPS_COMPLEX

 #define DDSCAPS_COMPLEX 0x00000008
See tex_dds.cpp.

DDSCAPS_MIPMAP

 #define DDSCAPS_MIPMAP 0x00400000
See tex_dds.cpp.

DDSCAPS_TEXTURE

 #define DDSCAPS_TEXTURE 0x00001000
See tex_dds.cpp.

DDSD_CAPS

 #define DDSD_CAPS 0x00000001
See tex_dds.cpp.

DDSD_DEPTH

 #define DDSD_DEPTH 0x00800000
See tex_dds.cpp.

DDSD_HEIGHT

 #define DDSD_HEIGHT 0x00000002
See tex_dds.cpp.

DDSD_LINEARSIZE

 #define DDSD_LINEARSIZE 0x00080000
See tex_dds.cpp.

DDSD_MIPMAPCOUNT

 #define DDSD_MIPMAPCOUNT 0x00020000
See tex_dds.cpp.

DDSD_PITCH

 #define DDSD_PITCH 0x00000008
See tex_dds.cpp.

DDSD_PIXELFORMAT

 #define DDSD_PIXELFORMAT 0x00001000
See tex_dds.cpp.

DDSD_WIDTH

 #define DDSD_WIDTH 0x00000004
See tex_dds.cpp.

INCLUDED_GRAPHICS_CURSOR

 #define INCLUDED_GRAPHICS_CURSOR 
See cursor.h.

INCLUDED_OGL_SHADER

 #define INCLUDED_OGL_SHADER 
See ogl_shader.h.

INCLUDED_OGL_TEX

 #define INCLUDED_OGL_TEX 
See ogl_tex.h.

INCLUDED_TEX

 #define INCLUDED_TEX 
See tex.h.

INCLUDED_TEX_CODEC

 #define INCLUDED_TEX_CODEC 
See tex_codec.h.

INCLUDED_TEX_INTERNAL

 #define INCLUDED_TEX_INTERNAL 
See tex_internal.h.

INCLUDED_UNIFONT

 #define INCLUDED_UNIFONT 
See unifont.h.

OUTPUT_BUF_SIZE

 #define OUTPUT_BUF_SIZE 64*KiB	
See tex_jpg.cpp.


Macro Detail

CHECK_TEX

 #define CHECK_TEX(t) RETURN_ERR(tex_validate(t))
See tex.cpp.

REGISTER_CODEC

 #define REGISTER_CODEC(name) extern void name##_register(); name##_register()
See tex_codec.cpp.

TEX_CODEC_REGISTER

 #define TEX_CODEC_REGISTER(namestatic) TexCodecVTbl vtbl = {name##_decode, name##_encode, name##_transform,name##_is_hdr, name##_is_ext, name##_hdr_size,#name};void name##_register() { tex_codec_register(&vtbl); }
build codec vtbl and register it. the codec will be queried for future texture load requests. call order is undefined, but since each codec only steps up if it can handle the given format, this is not a problem. @param name identifier of codec (not string!). used to bind 'member' functions prefixed with it to the vtbl, and as the TexCodecVTbl name. it should also mirror the default file extension (e.g. dds) - this is relied upon (but verified) in the self-test. usage: at file scope within the source file containing the codec's methods.
See tex_codec.h.

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD