X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=r_textures.h;h=4450e31bbd23463ebe37faa4a7af011f7b7f2733;hb=fb2170426e2f351328b08035e2dd05f5bd6dbb19;hp=a79b607c10c1a634369d435bc8239eb75dbc4cd5;hpb=0e6f1ee37a279e6224129b8eb4346592cc6b9885;p=xonotic%2Fdarkplaces.git diff --git a/r_textures.h b/r_textures.h index a79b607c..4450e31b 100644 --- a/r_textures.h +++ b/r_textures.h @@ -39,6 +39,9 @@ typedef enum textype_e { + // placeholder for unused textures in r_rendertarget_t + TEXTYPE_UNUSED, + // 8bit paletted TEXTYPE_PALETTE, // 32bit RGBA @@ -56,6 +59,9 @@ typedef enum textype_e // 4x4 block compressed 15bit color plus 8bit alpha (8 bits per pixel) TEXTYPE_DXT5, + // default compressed type for GLES2 + TEXTYPE_ETC1, + // 8bit paletted in sRGB colorspace TEXTYPE_SRGB_PALETTE, // 32bit RGBA in sRGB colorspace @@ -94,16 +100,6 @@ typedef enum textype_e } textype_t; -/* -#ifdef WIN32 -#define SUPPORTD3D -#define SUPPORTDIRECTX -#ifdef SUPPORTD3D -#include -#endif -#endif -*/ - // contents of this structure are mostly private to gl_textures.c typedef struct rtexture_s { @@ -111,26 +107,8 @@ typedef struct rtexture_s int texnum; // GL texture slot number int renderbuffernum; // GL renderbuffer slot number qboolean dirty; // indicates that R_RealGetTexture should be called + qboolean glisdepthstencil; // indicates that FBO attachment has to be GL_DEPTH_STENCIL_ATTACHMENT int gltexturetypeenum; // used by R_Mesh_TexBind - // d3d stuff the backend needs - void *d3dtexture; - void *d3dsurface; -#ifdef SUPPORTD3D - qboolean d3disrendertargetsurface; - qboolean d3disdepthstencilsurface; - int d3dformat; - int d3dusage; - int d3dpool; - int d3daddressu; - int d3daddressv; - int d3daddressw; - int d3dmagfilter; - int d3dminfilter; - int d3dmipfilter; - int d3dmaxmiplevelfilter; - int d3dmipmaplodbias; - int d3dmaxmiplevel; -#endif } rtexture_t; @@ -171,7 +149,7 @@ rtexture_t *R_LoadTexture3D(rtexturepool_t *rtexturepool, const char *identifier rtexture_t *R_LoadTextureCubeMap(rtexturepool_t *rtexturepool, const char *identifier, int width, const unsigned char *data, textype_t textype, int flags, int miplevel, const unsigned int *palette); rtexture_t *R_LoadTextureShadowMap2D(rtexturepool_t *rtexturepool, const char *identifier, int width, int height, textype_t textype, qboolean filter); rtexture_t *R_LoadTextureRenderBuffer(rtexturepool_t *rtexturepool, const char *identifier, int width, int height, textype_t textype); -rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filename, qboolean srgb, int flags, qboolean *hasalphaflag, float *avgcolor, int miplevel); +rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filename, qboolean srgb, int flags, qboolean *hasalphaflag, float *avgcolor, int miplevel, qboolean optionaltexture); // saves a texture to a DDS file int R_SaveTextureDDSFile(rtexture_t *rt, const char *filename, qboolean skipuncompressed, qboolean hasalpha);