stuff
This commit is contained in:
1 parent
9abd34baa3
commit
0e843c2a96
2 files changed
+10
-11
No files matched your search
@@ -336,8 +336,8 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
else
|
||||
gltex->mipmap.flags = TF_CHROMAKEYED | TF_WRAPXY;
|
||||
|
||||
gltex->mipmap.width = (UINT16)texture->width;
|
||||
gltex->mipmap.height = (UINT16)texture->height;
|
||||
gltex->mipmap.width = SHORT(texture->width);
|
||||
gltex->mipmap.height = SHORT(texture->height);
|
||||
|
||||
if (skyspecial)
|
||||
gltex->mipmap.format = GL_TEXFMT_RGBA; // that skyspecial code below assumes this format ...
|
||||
@@ -416,14 +416,13 @@ void HWR_MakePatch (patch_t *patch, GLPatch_t *glPatch, GLMipmap_t *glMipmap, bo
|
||||
glPatch->leftoffset = SHORT(patch->leftoffset);
|
||||
glPatch->topoffset = SHORT(patch->topoffset);
|
||||
|
||||
//glMipmap->width = (UINT16)SHORT(patch->width);
|
||||
//glMipmap->height = (UINT16)SHORT(patch->height);
|
||||
glMipmap->width = glMipmap->height = 1;
|
||||
while (glMipmap->width < glPatch->width) glMipmap->width <<= 1;
|
||||
while (glMipmap->height < glPatch->height) glMipmap->height <<= 1;
|
||||
|
||||
// no wrap around, no chroma key
|
||||
glMipmap->flags = 0;
|
||||
|
||||
// setup the texture info
|
||||
glMipmap->format = patchformat;
|
||||
|
||||
@@ -443,8 +442,6 @@ void HWR_MakePatch (patch_t *patch, GLPatch_t *glPatch, GLMipmap_t *glMipmap, bo
|
||||
glPatch->width, glPatch->height,
|
||||
patch);
|
||||
}
|
||||
|
||||
//glPatch->max_s = glPatch->max_t = 1.0f;
|
||||
}
|
||||
|
||||
// =================================================
|
||||
|
||||
@@ -33,16 +33,18 @@ typedef enum GLTextureFormat_e
|
||||
GL_TEXFMT_ALPHA_INTENSITY_88 = 0x22,
|
||||
} GLTextureFormat_t;
|
||||
|
||||
// data holds the address of the graphics data cached in heap memory
|
||||
// NULL if the texture is not in Doom heap cache.
|
||||
// Texture information (misleadingly named "mipmap" all over the code.)
|
||||
// The *data pointer holds the address of the graphics data cached in heap memory.
|
||||
// NULL if the texture is not in SRB2's heap cache.
|
||||
struct GLMipmap_s
|
||||
{
|
||||
// for UpdateTexture
|
||||
GLTextureFormat_t format;
|
||||
void *data;
|
||||
|
||||
UINT32 flags;
|
||||
UINT16 width, height;
|
||||
UINT32 downloaded; // tex_downloaded
|
||||
UINT32 downloaded; // The GPU has this texture.
|
||||
|
||||
struct GLMipmap_s *nextcolormap;
|
||||
const UINT8 *colormap;
|
||||
@@ -50,12 +52,12 @@ struct GLMipmap_s
|
||||
typedef struct GLMipmap_s GLMipmap_t;
|
||||
|
||||
//
|
||||
// Doom texture info, as cached for hardware rendering
|
||||
// Level textures, as cached for hardware rendering.
|
||||
//
|
||||
struct GLMapTexture_s
|
||||
{
|
||||
GLMipmap_t mipmap;
|
||||
float scaleX; //used for scaling textures on walls
|
||||
float scaleX; //used for scaling textures on walls
|
||||
float scaleY;
|
||||
};
|
||||
typedef struct GLMapTexture_s GLMapTexture_t;
|
||||
|
||||
Reference in new issue
Block a user