lots of changes to rasters; mostly mipmap support and DXT conversion

This commit is contained in:
aap
2020-11-11 09:34:36 +01:00
parent 3e2080ad56
commit 7e80d45cdb
19 changed files with 895 additions and 328 deletions

View File

@@ -268,6 +268,7 @@ struct Raster
static Raster *getCurrentContext(void);
bool32 renderFast(int32 x, int32 y);
static Raster *convertTexToCurrentPlatform(Raster *ras);
#ifndef RWPUBLIC
static void registerModule(void);
#endif
@@ -337,9 +338,6 @@ void expandPal4_BE(uint8 *dst, uint32 dststride, uint8 *src, uint32 srcstride, i
void compressPal4_BE(uint8 *dst, uint32 dststride, uint8 *src, uint32 srcstride, int32 w, int32 h);
void copyPal8(uint8 *dst, uint32 dststride, uint8 *src, uint32 srcstride, int32 w, int32 h);
void flipDXT1(uint8 *dst, uint8 *src, uint32 width, uint32 height);
void flipDXT3(uint8 *dst, uint8 *src, uint32 width, uint32 height);
void flipDXT5(uint8 *dst, uint8 *src, uint32 width, uint32 height);
void flipDXT(int32 type, uint8 *dst, uint8 *src, uint32 width, uint32 height);
@@ -352,9 +350,9 @@ struct Texture
enum FilterMode {
NEAREST = 1,
LINEAR,
MIPNEAREST,
MIPNEAREST, // one mipmap
MIPLINEAR,
LINEARMIPNEAREST,
LINEARMIPNEAREST, // mipmap interpolated
LINEARMIPLINEAR
};
enum Addressing {