]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_textures.h
avoid NULL pointer access if a surface had an unsupported type
[xonotic/darkplaces.git] / r_textures.h
index c89811833fe56733224b610afc26fab97e9b71ac..0cbad6523820d2371364545c2f4b81e8aab5736b 100644 (file)
 #define TEXF_ISWORLD 0x00004000
 // indicates texture should be affected by gl_picmip_sprites and r_picmipsprites (maybe others in the future) instead of gl_picmip_other
 #define TEXF_ISSPRITE 0x00008000
-// indicates the texture will be used as a render target (D3D hint)
-#define TEXF_RENDERTARGET 0x0010000
 // used for checking if textures mismatch
-#define TEXF_IMPORTANTBITS (TEXF_ALPHA | TEXF_MIPMAP | TEXF_CLAMP | TEXF_FORCENEAREST | TEXF_FORCELINEAR | TEXF_PICMIP | TEXF_COMPRESS | TEXF_COMPARE | TEXF_LOWPRECISION | TEXF_RENDERTARGET)
+#define TEXF_IMPORTANTBITS (TEXF_ALPHA | TEXF_MIPMAP | TEXF_CLAMP | TEXF_FORCENEAREST | TEXF_FORCELINEAR | TEXF_PICMIP | TEXF_COMPRESS | TEXF_COMPARE | TEXF_LOWPRECISION)
 
 typedef enum textype_e
 {
@@ -54,20 +52,10 @@ typedef enum textype_e
        // 4x4 block compressed 15bit color plus 8bit alpha (8 bits per pixel)
        TEXTYPE_DXT5,
        // this represents the same format as the framebuffer, for fast copies
-       TEXTYPE_COLORBUFFER
+       TEXTYPE_COLORBUFFER,
 }
 textype_t;
 
-/*
-#ifdef WIN32
-#define SUPPORTD3D
-#define SUPPORTDIRECTX
-#ifdef SUPPORTD3D
-#include <d3d9.h>
-#endif
-#endif
-*/
-
 // contents of this structure are mostly private to gl_textures.c
 typedef struct rtexture_s
 {
@@ -75,22 +63,6 @@ typedef struct rtexture_s
        int texnum;
        qboolean dirty;
        int gltexturetypeenum; // exposed for use in R_Mesh_TexBind
-       // d3d stuff the backend needs
-       void *d3dtexture;
-#ifdef SUPPORTD3D
-       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;