mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 09:51:40 +00:00
Create the colormap texture.
This commit is contained in:
parent
fd67f3500b
commit
7e5b3304fc
2 changed files with 9 additions and 1 deletions
|
@ -37,7 +37,8 @@ typedef struct shaderparam_s {
|
||||||
int location;
|
int location;
|
||||||
} shaderparam_t;
|
} shaderparam_t;
|
||||||
|
|
||||||
extern int glsl_palette;
|
extern int glsl_palette;
|
||||||
|
extern int glsl_colormap;
|
||||||
|
|
||||||
void GL_EndRendering (void);
|
void GL_EndRendering (void);
|
||||||
int GL_CompileShader (const char *name, const char *shader_src, int type);
|
int GL_CompileShader (const char *name, const char *shader_src, int type);
|
||||||
|
|
|
@ -52,6 +52,7 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
|
||||||
#include "QF/GLSL/defines.h"
|
#include "QF/GLSL/defines.h"
|
||||||
#include "QF/GLSL/funcs.h"
|
#include "QF/GLSL/funcs.h"
|
||||||
#include "QF/GLSL/qf_vid.h"
|
#include "QF/GLSL/qf_vid.h"
|
||||||
|
#include "QF/GLSL/qf_textures.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "d_iface.h"
|
#include "d_iface.h"
|
||||||
|
@ -59,6 +60,7 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
|
|
||||||
VISIBLE int glsl_palette;
|
VISIBLE int glsl_palette;
|
||||||
|
VISIBLE int glsl_colormap;
|
||||||
VISIBLE int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR;
|
VISIBLE int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR;
|
||||||
VISIBLE int gl_filter_max = GL_LINEAR;
|
VISIBLE int gl_filter_max = GL_LINEAR;
|
||||||
VISIBLE float gldepthmin, gldepthmax;
|
VISIBLE float gldepthmin, gldepthmax;
|
||||||
|
@ -121,6 +123,11 @@ VID_SetPalette (unsigned char *palette)
|
||||||
qfglTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
qfglTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
qfglGenerateMipmap (GL_TEXTURE_2D);
|
qfglGenerateMipmap (GL_TEXTURE_2D);
|
||||||
free (pal);
|
free (pal);
|
||||||
|
|
||||||
|
if (glsl_colormap)
|
||||||
|
GL_ReleaseTexture (glsl_colormap);
|
||||||
|
glsl_colormap = GL_LoadQuakeTexture ("colormap", 256, VID_GRADES,
|
||||||
|
vid.colormap8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue