Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
19 #include "shared/shared.h"
20 #include "common/bsp.h"
21 #include "common/cmd.h"
22 #include "common/common.h"
23 #include "common/cvar.h"
24 #include "common/files.h"
25 #include "common/math.h"
26 #include "client/video.h"
28 #include "refresh/refresh.h"
29 #include "refresh/images.h"
30 #include "refresh/models.h"
31 #include "system/hunk.h"
44 #ifdef GL_VERSION_ES_CM_1_0
45 #define QGL_INDEX_TYPE GLushort
46 #define QGL_INDEX_ENUM GL_UNSIGNED_SHORT
48 #define QGL_INDEX_TYPE GLuint
49 #define QGL_INDEX_ENUM GL_UNSIGNED_INT
54 #define TAB_SIN(x) gl_static.sintab[(x) & 255]
55 #define TAB_COS(x) gl_static.sintab[((x) + 64) & 255]
76 byte latlngtab[NUMVERTEXNORMALS][2];
77 byte lightstylemap[MAX_LIGHTSTYLES];
83 GLfloat viewmatrix[16];
91 cplane_t frustumPlanes[4];
95 GLfloat entmatrix[16];
118 #define AT_LEAST_OPENGL_ANY(major, minor) \
119 (gl_config.version_major > major || (gl_config.version_major == major && gl_config.version_minor >= minor))
121 #define AT_LEAST_OPENGL(major, minor) \
122 (!gl_config.es_profile && AT_LEAST_OPENGL_ANY(major, minor))
124 #define AT_LEAST_OPENGL_ES(major, minor) \
125 (gl_config.es_profile && AT_LEAST_OPENGL_ANY(major, minor))
166 extern cvar_t *gl_dlight_falloff;
178 extern cvar_t *gl_nobind;
179 extern cvar_t *gl_test;
203 int w,
int h,
int *s,
int *t);
205 void GL_MultMatrix(GLfloat *out,
const GLfloat *a,
const GLfloat *b);
245 #define VERTEX_SIZE 8
251 #define LIGHT_STYLE(surf, i) \
252 &glr.fd.lightstyles[gl_static.lightstylemap[(surf)->styles[i]]]
254 #define LM_MAX_LIGHTMAPS 32
255 #define LM_BLOCK_WIDTH 256
256 #define LM_BLOCK_HEIGHT 256
297 #define GLS_BLEND_MASK (GLS_BLEND_BLEND | GLS_BLEND_ADD | GLS_BLEND_MODULATE)
353 qglColorPointer(size, GL_UNSIGNED_BYTE,
sizeof(GLfloat) * stride, pointer);
388 void GL_Ortho(GLfloat xmin, GLfloat xmax, GLfloat ymin, GLfloat ymax, GLfloat znear, GLfloat zfar);
410 void Draw_Stringf(
int x,
int y,
const char *fmt, ...);
411 void Draw_Stats(
void);
412 void Draw_Lightmaps(
void);
413 void Draw_Scrap(
void);
430 void R_DrawChar_GL(
int x,
int y,
int flags,
int c, qhandle_t font);
431 int R_DrawString_GL(
int x,
int y,
int flags,
size_t maxlen,
const char *s, qhandle_t font);
439 #define TEXNUM_DEFAULT gl_static.texnums[0]
440 #define TEXNUM_SCRAP gl_static.texnums[1]
441 #define TEXNUM_PARTICLE gl_static.texnums[2]
442 #define TEXNUM_BEAM gl_static.texnums[3]
443 #define TEXNUM_WHITE gl_static.texnums[4]
444 #define TEXNUM_BLACK gl_static.texnums[5]
459 #define TESS_MAX_VERTICES 4096
460 #define TESS_MAX_INDICES (3 * TESS_MAX_VERTICES)
505 void R_SetSky_GL(
const char *name,
float rotate, vec3_t axis);
523 qerror_t
MOD_LoadMD2_GL(model_t *model,
const void *rawdata,
size_t length);
524 qerror_t
MOD_LoadMD3_GL(model_t *model,
const void *rawdata,
size_t length);
void R_DrawFill32_GL(int x, int y, int w, int h, uint32_t color)
void R_DrawStretchPic_GL(int x, int y, int w, int h, qhandle_t pic)
PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB
void GL_InitPrograms(void)
void GL_AdjustColor(vec3_t color)
cvar_t * gl_coloredlightmaps
qboolean GL_AllocBlock(int width, int height, int *inuse, int w, int h, int *s, int *t)
static void GL_ColorFloatPointer(GLint size, GLsizei stride, const GLfloat *pointer)
qerror_t MOD_LoadMD3_GL(model_t *model, const void *rawdata, size_t length)
void GL_PushLights(mface_t *surf)
void GL_Ortho(GLfloat xmin, GLfloat xmax, GLfloat ymin, GLfloat ymax, GLfloat znear, GLfloat zfar)
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT
void IMG_Load_GL(image_t *image, byte *pic)
void MOD_Reference_GL(model_t *model)
void GL_DrawParticles(void)
struct maliasframe_s maliasframe_t
void GL_AddAlphaFace(mface_t *face)
int R_DrawString_GL(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)
void GL_BindTexture(GLuint tmu, GLuint texnum)
void GL_ClearSolidFaces(void)
glCullResult_t GL_CullSphere(const vec3_t origin, float radius)
void GL_ShutdownPrograms(void)
static void GL_ClientActiveTexture(GLuint tmu)
void R_DrawFill8_GL(int x, int y, int w, int h, int c)
float R_ClampScaleGL(cvar_t *var)
void R_SetSky_GL(const char *name, float rotate, vec3_t axis)
static void GL_LockArrays(GLsizei count)
uint32_t inverse_intensity_100
static void GL_UnlockArrays(void)
void GL_DrawAlphaFaces(void)
GLbitfield stencil_buffer_bit
void GL_MultMatrix(GLfloat *out, const GLfloat *a, const GLfloat *b)
void R_DrawPic_GL(int x, int y, qhandle_t pic)
image_t * skins[MAX_ALIAS_SKINS]
static void GL_LightCoordPointer(GLint size, GLsizei stride, const GLfloat *pointer)
void HQ4x_Render(uint32_t *output, const uint32_t *input, int width, int height)
#define TESS_MAX_VERTICES
qerror_t MOD_LoadMD2_GL(model_t *model, const void *rawdata, size_t length)
void R_SetAlphaScale_GL(float alpha)
cvar_t * gl_modulate_entities
void GL_ArrayBits(glArrayBits_t bits)
#define qglTexCoordPointer
void R_SetColor_GL(uint32_t color)
void GL_RotateForEntity(vec3_t origin, float scale)
void GL_DrawFace(mface_t *surf)
void QGL_ClearErrors(void)
void GL_LightPoint(vec3_t origin, vec3_t color)
struct maliastc_s maliastc_t
void R_AddSkySurface(mface_t *surf)
void GL_RebuildLighting(void)
static void GL_ColorBytePointer(GLint size, GLsizei stride, const GLubyte *pointer)
static void GL_TexCoordPointer(GLint size, GLsizei stride, const GLfloat *pointer)
glCullResult_t GL_CullLocalBox(const vec3_t origin, vec3_t bounds[2])
void GL_DrawBspModel(mmodel_t *model)
void GL_SampleLightPoint(vec3_t color)
void GL_DisableOutlines(void)
void R_SetClipRect_GL(const clipRect_t *clip)
struct masliasvert_s maliasvert_t
void GL_AddSolidFace(mface_t *face)
static void GL_ActiveTexture(GLuint tmu)
void GL_DrawSolidFaces(void)
void R_ClearColor_GL(void)
void R_SetScale_GL(float scale)
PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB
void GL_ForceTexture(GLuint tmu, GLuint texnum)
void HQ2x_Render(uint32_t *output, const uint32_t *input, int width, int height)
cvar_t * gl_modulate_world
static void GL_VertexPointer(GLint size, GLsizei stride, const GLfloat *pointer)
void GL_ShutdownImages(void)
void GL_SetDefaultState(void)
cvar_t * gl_doublelight_entities
static void GL_LoadMatrix(const GLfloat *matrix)
uint32_t inverse_intensity_33
struct maliasmesh_s maliasmesh_t
cvar_t * gl_fragment_program
void R_LightPoint_GL(vec3_t origin, vec3_t color)
const GLfloat * currentmatrix
void GL_LoadWorld(const char *name)
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT
glCullResult_t GL_CullBox(vec3_t bounds[2])
void IMG_Unload_GL(image_t *image)
void GL_EnableOutlines(void)
byte * IMG_ReadPixels_GL(int *width, int *height, int *rowbytes)
void GL_StateBits(glStateBits_t bits)
void R_SetAlpha_GL(float alpha)
void GL_DrawAliasModel(model_t *model)
uint32_t inverse_intensity_66
void R_DrawChar_GL(int x, int y, int flags, int c, qhandle_t font)
void R_TileClear_GL(int x, int y, int w, int h, qhandle_t pic)
qboolean GL_ShowErrors(const char *func)