25#define BOTTOM_DEFAULT 6
27#define TOP_RANGE (TOP_DEFAULT<<4)
28#define BOTTOM_RANGE (BOTTOM_DEFAULT<<4)
36static const texid_t r_nulltex = NULL;
45 #ifdef VERTEXINDEXBYTES
46 #define sizeof_index_t VERTEXINDEXBYTES
47 #elif (defined(GLQUAKE) && defined(HAVE_LEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID) || defined(FTE_TARGET_WEB)
48 #define sizeof_index_t 2
51#if sizeof_index_t == 2
52 #define GL_INDEX_TYPE GL_UNSIGNED_SHORT
53 #define D3DFMT_QINDEX D3DFMT_INDEX16
54 #define DXGI_FORMAT_INDEX_UINT DXGI_FORMAT_R16_UINT
55 #define VK_INDEX_TYPE VK_INDEX_TYPE_UINT16
57 #define MAX_INDICIES 0xffffu
60 #define sizeof_index_t 4
61 #define GL_INDEX_TYPE GL_UNSIGNED_INT
62 #define D3DFMT_QINDEX D3DFMT_INDEX32
63 #define DXGI_FORMAT_INDEX_UINT DXGI_FORMAT_R32_UINT
64 #define VK_INDEX_TYPE VK_INDEX_TYPE_UINT32
66 #define MAX_INDICIES 0x00ffffffu
74#define NTSC_GREEN 0.587
75#define NTSC_BLUE 0.114
76#define NTSC_SUM (NTSC_RED + NTSC_GREEN + NTSC_BLUE)
167#define MAX_GEOMSETS 32
168#define Q1UNSPECIFIED 0x00ffffff
172 char skinname[MAX_QPATH];
177 char qwskinname[MAX_QPATH];
200#define MAXFRUSTUMPLANES 7
246 char texname[MAX_QPATH];
248#define R_MAX_RENDERTARGETS 8
251#define R_MAX_RECURSE 6
369#define LMBLOCK_SIZE_MAX 2048
423 int allocated[LMBLOCK_SIZE_MAX];
450#define IF_TEXTYPESHIFT 10
451#define IF_TEXTYPE_2D (PTI_2D<<IF_TEXTYPESHIFT)
452#define IF_TEXTYPE_3D (PTI_3D<<IF_TEXTYPESHIFT)
453#define IF_TEXTYPE_CUBE (PTI_CUBE<<IF_TEXTYPESHIFT)
454#define IF_TEXTYPE_2D_ARRAY (PTI_2D_ARRAY<<IF_TEXTYPESHIFT)
455#define IF_TEXTYPE_CUBE_ARRAY (PTI_CUBE_ARRAY<<IF_TEXTYPESHIFT)
456#define IF_TEXTYPE_ANY (PTI_ANY<<IF_TEXTYPESHIFT)
481#define R_LoadTexture8(id,w,h,d,f,t) Image_GetTexture(id, NULL, f, d, NULL, w, h, t?TF_TRANS8:TF_SOLID8)
482#define R_LoadTexture32(id,w,h,d,f) Image_GetTexture(id, NULL, f, d, NULL, w, h, TF_RGBA32)
483#define R_LoadTextureFB(id,w,h,d,f) Image_GetTexture(id, NULL, f, d, NULL, w, h, TF_TRANS8_FULLBRIGHT)
484#define R_LoadTexture(id,w,h,fmt,d,fl) Image_GetTexture(id, NULL, fl, d, NULL, w, h, fmt)
516#define plugimageloaderfuncs_name "ImageLoader"
582#ifdef RUNTIMELIGHTING
585void LightPlane (
struct relight_ctx_s *
ctx,
struct llightinfo_s *threadctx, lightstyleindex_t surf_styles[MAXCPULIGHTMAPS],
unsigned int *surf_expsamples,
qbyte *surf_rgbsamples,
qbyte *surf_deluxesamples,
vec4_t surf_plane,
vec4_t surf_texplanes[2],
vec2_t exactmins,
vec2_t exactmaxs,
int texmins[2],
int texsize[2],
float lmscale);
620void R_SetFrustum (
float projmat[16],
float viewmat[16]);
732#define r_meshpitch (*cvar_r_meshpitch)
733#define r_meshroll (*cvar_r_meshroll)
788#define RQuantAdd(type,quant) rquant[type] += quant
791#define RSpeedLocals()
793#define RSpeedRemark()
794#define RSpeedEnd(spt)
796#define RSpeedLocals() double rsp
797#define RSpeedMark() double rsp = (r_speeds.ival>1)?Sys_DoubleTime()*1000000:0
798#define RSpeedRemark() rsp = (r_speeds.ival>1)?Sys_DoubleTime()*1000000:0
800#if defined(_WIN32) && defined(GLQUAKE)
802#define RSpeedEnd(spt) do {if(r_speeds.ival > 1){if(r_speeds.ival > 2 && qglFinish)qglFinish(); rspeeds[spt] += (double)(Sys_DoubleTime()*1000000) - rsp;}}while (0)
804#define RSpeedEnd(spt) rspeeds[spt] += (r_speeds.ival>1)?Sys_DoubleTime()*1000000 - rsp:0
unsigned int width
Definition: bymorphed.h:4
unsigned int height
Definition: bymorphed.h:5
cvar_t model
Definition: cl_main.c:153
double time
Definition: cl_main.c:306
entity_t * ent
Definition: com_mesh.c:717
vecV_t * coords
Definition: com_mesh.c:710
dVector3 result
Definition: com_phys_ode.c:519
dReal depth
Definition: com_phys_ode.c:320
dReal dReal radius
Definition: com_phys_ode.c:289
fs_relative
Definition: common.h:661
unsigned char qbyte
Definition: common.h:127
intptr_t qintptr_t
Definition: common.h:38
char filename[64]
Definition: generatebuiltin.c:8
image_t * image
Definition: gl_font.c:402
size_t magicsize
Definition: gl_model.c:911
char * formatname
Definition: gl_model.c:908
qbyte * magic
Definition: gl_model.c:910
GLdouble GLdouble GLdouble GLdouble zNear
Definition: gl_vidcommon.c:166
GLdouble GLdouble GLdouble GLdouble GLdouble zFar
Definition: gl_vidcommon.c:166
GLclampf GLclampf blue
Definition: gl_vidcommon.c:39
GLclampf green
Definition: gl_vidcommon.c:39
static EGLSurface surface
Definition: gl_videgl.c:43
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
GLfloat GLfloat y
Definition: glquake.h:158
GLsizei const GLcharARB const GLint * length
Definition: glquake.h:149
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLfloat x
Definition: glquake.h:158
GLdouble GLdouble r
Definition: glquake.h:969
GLfloat GLfloat GLfloat GLfloat w
Definition: glquake.h:158
GLenum format
Definition: glsupp.h:502
GLint GLfloat * parms
Definition: glsupp.h:612
GLenum GLsizei len
Definition: glsupp.h:502
void * module
Definition: image.c:236
static png_inforp png_colorp * palette
Definition: image.c:1410
char fname[MAX_QPATH]
Definition: m_mp3.c:160
struct texid_s texid_tf
Definition: merged.h:292
char ** data
Definition: p_script.c:63
int const void * p
Definition: pr_lua.c:232
int b
Definition: pr_lua.c:242
const char * var
Definition: pr_lua.c:225
int const char * e
Definition: pr_lua.c:259
int idx
Definition: pr_lua.c:221
shader_t * shader
Definition: r_2d.c:51
uploadfmt_t fmt
Definition: r_2d.c:48
texid_t tex
Definition: r_2d.c:52
cm_surface_t * surf
Definition: r_d3.c:697
texid_t particlecqtexture
Definition: renderer.c:2998
void Mod_LightmapAllocBlock(lmalloc_t *lmallocator, int w, int h, unsigned short *x, unsigned short *y, int *tnum)
Definition: gl_model.c:3045
cvar_t vid_hardwaregamma
Definition: renderer.c:504
void Media_VideoRestarted(void)
Definition: m_mp3.c:3924
qbyte GetPaletteIndexRange(int first, int stop, int red, int green, int blue)
Definition: r_2d.c:138
refEntityType_t
Definition: render.h:78
@ RT_RAIL_CORE
Definition: render.h:83
@ RT_POLY
Definition: render.h:80
@ RT_SPRITE
Definition: render.h:81
@ RT_BEAM
Definition: render.h:82
@ RT_PORTALCAMERA
Definition: render.h:90
@ RT_RAIL_RINGS
Definition: render.h:84
@ RT_LIGHTNING
Definition: render.h:85
@ RT_PORTALSURFACE
Definition: render.h:86
@ RT_MAX_REF_ENTITY_TYPE
Definition: render.h:92
@ RT_MODEL
Definition: render.h:79
int Media_Capturing(void)
Definition: m_mp3.c:3393
void D3D9_Set2D(void)
Definition: vid_d3d.c:932
cvar_t r_lightstylespeed
Definition: renderer.c:189
cvar_t r_lightmap_scale
Definition: renderer.c:191
void Mod_ResortShaders(void)
Definition: gl_model.c:312
@ RSPEED_PROTOCOL
Definition: render.h:750
@ RSPEED_TOTALREFRESH
Definition: render.h:741
@ RSPEED_CSQCREDRAW
Definition: render.h:743
@ RSPEED_RTLIGHTS
Definition: render.h:748
@ RSPEED_DYNAMIC
Definition: render.h:746
@ RSPEED_LINKENTITIES
Definition: render.h:744
@ RSPEED_CSQCPHYSICS
Definition: render.h:742
@ RSPEED_OPAQUE
Definition: render.h:747
@ RSPEED_PARTICLES
Definition: render.h:751
@ RSPEED_TRANSPARENTS
Definition: render.h:749
@ RSPEED_SERVER
Definition: render.h:755
@ RSPEED_AUDIO
Definition: render.h:756
@ RSPEED_ACQUIRE
Definition: render.h:760
@ RSPEED_SETUP
Definition: render.h:757
@ RSPEED_WORLDNODE
Definition: render.h:745
@ RSPEED_PALETTEFLASHES
Definition: render.h:753
@ RSPEED_SUBMIT
Definition: render.h:758
@ RSPEED_2D
Definition: render.h:754
@ RSPEED_MAX
Definition: render.h:762
@ RSPEED_PRESENT
Definition: render.h:759
@ RSPEED_PARTICLESDRAW
Definition: render.h:752
int Mod_FrameNumForName(struct model_s *model, int surfaceidx, const char *name)
Definition: com_mesh.c:5524
void GLR_Init(void)
Definition: gl_rmisc.c:448
void R_UpdateHDR(vec3_t org)
Definition: gl_rlight.c:67
texid_tf R_LoadHiResTexture(const char *name, const char *subpath, unsigned int flags)
void Renderer_Start(void)
Definition: renderer.c:1066
void Media_RecordFrame(void)
Definition: m_mp3.c:3446
cvar_t r_coronas_fadedist
Definition: render.h:712
int Mod_FrameNumForAction(struct model_s *model, int surfaceidx, int actionid)
Definition: com_mesh.c:5555
void Mod_Shutdown(qboolean final)
Definition: gl_model.c:747
cvar_t r_lightmap
Definition: renderer.c:144
float r_blobshadows
Definition: cl_ents.c:53
unsigned int skinid_t
Definition: render.h:95
void AddOcranaLEDsIndexed(qbyte *image, int h, int w)
cvar_t r_skyfog
Definition: gl_warp.c:43
cvar_t gl_maxdist
Definition: render.h:705
void R_SetFrustum(float projmat[16], float viewmat[16])
Definition: renderer.c:2812
void * Mod_Extradata(struct model_s *mod)
Definition: gl_model.c:783
cvar_t r_deluxemapping_cvar
Definition: renderer.c:380
void Surf_ClearSceneCache(void)
Definition: r_surf.c:3926
void Surf_LessenStains(void)
Definition: r_surf.c:267
struct texture_s * R_TextureAnimation(int frame, struct texture_s *base)
Definition: renderer.c:2627
texid_t beamtexture
Definition: renderer.c:3001
void Surf_BuildLightmaps(void)
Definition: r_surf.c:3949
@ RQUANT_MSECS
Definition: render.h:767
@ RQUANT_RTLIGHT_CULL_SCISSOR
Definition: render.h:782
@ RQUANT_RTLIGHT_CULL_PVS
Definition: render.h:781
@ RQUANT_SHADOWSIDES
Definition: render.h:776
@ RQUANT_SHADOWEDGES
Definition: render.h:775
@ RQUANT_ENTBATCHES
Definition: render.h:770
@ RQUANT_RTLIGHT_DRAWN
Definition: render.h:779
@ RQUANT_RTLIGHT_CULL_FRUSTUM
Definition: render.h:780
@ RQUANT_MAX
Definition: render.h:784
@ RQUANT_WORLDBATCHES
Definition: render.h:771
@ RQUANT_2DBATCHES
Definition: render.h:772
@ RQUANT_SHADOWINDICIES
Definition: render.h:774
@ RQUANT_DRAWS
Definition: render.h:769
@ RQUANT_PRIMITIVEINDICIES
Definition: render.h:768
@ RQUANT_LITFACES
Definition: render.h:777
cvar_t r_shadow_realtime_dlight
Definition: gl_shadow.c:62
void Surf_DeInit(void)
Definition: r_surf.c:3309
cvar_t r_softwarebanding_cvar
Definition: renderer.c:216
void GLR_InitTextures(void)
cvar_t * cvar_r_meshpitch
Definition: com_phys_ode.c:62
void Surf_PreNewMap(void)
Definition: r_surf.c:4116
void Mod_NowLoadExternal(struct model_s *loadmodel)
Definition: gl_model.c:1538
stereomethod_t
Definition: render.h:222
@ STEREO_OFF
Definition: render.h:223
@ STEREO_RED_BLUE
Definition: render.h:226
@ STEREO_RED_GREEN
Definition: render.h:227
@ STEREO_QUAD
Definition: render.h:224
@ STEREO_LEFTONLY
Definition: render.h:231
@ STEREO_RED_CYAN
Definition: render.h:225
@ STEREO_CROSSEYED
Definition: render.h:228
@ STEREO_RIGHTONLY
Definition: render.h:232
qboolean Image_UnloadTexture(image_t *tex)
cvar_t gl_max_size
Definition: renderer.c:411
skinid_t Mod_ReadSkinFile(const char *skinname, const char *skintext)
Definition: gl_alias.c:249
cvar_t r_telestyle
Definition: renderer.c:499
void Image_PrintInputFormatVersions(void)
void Mod_ClearAll(void)
Definition: gl_model.c:515
void Surf_DrawWorld(void)
Definition: r_surf.c:2968
void LightShutdown(struct relight_ctx_s *ctx)
Definition: ltface.c:128
struct relight_ctx_s * LightStartup(struct relight_ctx_s *ctx, struct model_s *model, qboolean shadows, qboolean skiplit)
Definition: ltface.c:133
void GLR_PushDlights(void)
void R_PushDlights(void)
Definition: gl_rlight.c:724
vec3_t vright
Definition: render.h:330
qboolean r_deluxemapping
Definition: renderer.c:383
cvar_t r_shadow_realtime_world_shadows
Definition: render.h:674
void BoostGamma(qbyte *rgba, int width, int height, uploadfmt_t fmt)
void R_Clutter_Purge(void)
Definition: r_part.c:474
qboolean Image_RegisterLoader(void *module, plugimageloaderfuncs_t *loader)
Definition: image.c:240
void Media_CaptureDemoEnd(void)
Definition: m_mp3.c:4121
vec3_t vup
Definition: render.h:330
qboolean WritePCXfile(const char *filename, enum fs_relative fsroot, qbyte *data, int width, int height, int rowbytes, qbyte *palette, qboolean upload)
Definition: image.c:2669
void Mod_Batches_Build(struct model_s *mod, struct builddata_s *bd)
Definition: gl_model.c:3277
cvar_t r_norefresh
Definition: renderer.c:340
struct texture_s * r_notexture_mip
Definition: renderer.c:25
image_t * Image_TextureIsValid(qintptr_t address)
int rquant[RQUANT_MAX]
Definition: renderer.c:31
texid_t explosiontexture
Definition: renderer.c:2999
qboolean Image_LocateHighResTexture(image_t *tex, flocation_t *bestloc, char *bestname, size_t bestnamesize, unsigned int *bestflags)
texid_t particletexture
Definition: renderer.c:2997
cvar_t r_shadow_realtime_world
Definition: gl_shadow.c:57
qboolean D3D9_LoadTextureMips(texid_t tex, const struct pendingtextureinfo *mips)
void D3D8_Set2D(void)
Definition: vid_d3d8.c:963
void Surf_NewMap(struct model_s *worldmodel)
Definition: r_surf.c:3999
qboolean r_fakeshadows
Definition: gl_shadow.c:2807
void Image_BlockSizeForEncoding(uploadfmt_t encoding, unsigned int *blockbytes, unsigned int *blockwidth, unsigned int *blockheight, unsigned int *blockdepth)
vec3_t r_origin
Definition: renderer.c:20
cvar_t r_shadow_shadowmapping
Definition: gl_shadow.c:68
void R_Clutter_Emit(struct batch_s **batches)
Definition: r_part.c:349
qboolean R_UnRegisterModule(void *module)
void R_LoadNumberedLightTexture(struct dlight_s *dl, int cubetexnum)
cvar_t gl_mindist
Definition: renderer.c:415
qboolean Renderer_Started(void)
Definition: renderer.c:1061
cvar_t r_coronas
Definition: renderer.c:168
qboolean D3D8_LoadTextureMips(texid_t tex, const struct pendingtextureinfo *mips)
cvar_t * cvar_r_meshroll
Definition: com_phys_ode.c:63
void GLR_DeInit(void)
Definition: gl_rmisc.c:433
qboolean Image_WriteKTXFile(const char *filename, enum fs_relative fsroot, struct pendingtextureinfo *mips)
void RQ_Init(void)
Definition: renderque.c:168
cvar_t r_clear
Definition: renderer.c:408
void R_LightArraysByte_BGR(const entity_t *entity, vecV_t *coords, byte_vec4_t *colours, int vertcount, vec3_t *normals, qboolean colormod)
Definition: com_mesh.c:748
cvar_t r_shadow_realtime_world_importlightentitiesfrommap
Definition: render.h:674
cvar_t gl_load24bit
Definition: renderer.c:405
cvar_t r_drawviewmodelinvis
Definition: renderer.c:154
cvar_t r_shadow_realtime_dlight_specular
Definition: gl_shadow.c:66
unsigned char stmap
Definition: render.h:373
void LightReloadEntities(struct relight_ctx_s *ctx, const char *entstring, qboolean ignorestyles)
Definition: ltface.c:146
void SaturateR8G8B8(qbyte *data, int size, float sat)
texid_tf R_LoadBumpmapTexture(const char *name, const char *subpath)
refdef_t r_refdef
Definition: renderer.c:19
cvar_t r_lightprepass_cvar
Definition: renderer.c:479
qboolean D3D11_LoadTextureMips(texid_t tex, const struct pendingtextureinfo *mips)
void BE_GenModelBatches(struct batch_s **batches, const struct dlight_s *dl, unsigned int bemode, const qbyte *worldpvs, const int *worldareas)
unsigned short index_t
Definition: render.h:56
image_t *QDECL Image_GetTexture(const char *identifier, const char *subpath, unsigned int flags, void *fallbackdata, void *fallbackpalette, int fallbackwidth, int fallbackheight, uploadfmt_t fallbackfmt)
cvar_t r_lightstylesmooth
Definition: renderer.c:187
qbyte * ReadRawImageFile(qbyte *buf, int len, int *width, int *height, uploadfmt_t *format, qboolean force_rgba8, const char *fname)
void * Image_ResampleTexture(uploadfmt_t format, const void *in, int inwidth, int inheight, void *out, int outwidth, int outheight)
skinfile_t * Mod_LookupSkin(skinid_t id)
Definition: gl_alias.c:118
void R_GAlias_DrawBatch(struct batch_s *batch)
Definition: gl_alias.c:1674
texid_t R_GetDefaultEnvmap(void)
Definition: gl_warp.c:61
shader_t * Mod_RegisterBasicShader(struct model_s *mod, const char *texname, unsigned int usageflags, const char *shadertext, uploadfmt_t pixelfmt, unsigned int width, unsigned int height, void *pixeldata, void *palettedata)
Definition: gl_shader.c:6403
void R_AnimateLight(void)
Definition: gl_rlight.c:107
void GLR_RenderView(void)
Definition: gl_rmain.c:1997
float r_shadow_realtime_world_lightmaps_force
Definition: gl_shadow.c:60
void GLVID_DeInit(void)
Definition: gl_viddroid.c:58
struct pendingtextureinfo * Image_LoadMipsFromMemory(int flags, const char *iname, const char *fname, qbyte *filedata, int filesize)
qboolean Media_PausedDemo(qboolean fortiming)
Definition: m_mp3.c:3405
void R_RestartRenderer_f(void)
Definition: renderer.c:2316
void CL_BlendFog(fogstate_t *result, fogstate_t *oldf, float time, fogstate_t *newf)
Definition: cl_main.c:1914
void D3D8_DestroyTexture(texid_t tex)
Definition: d3d8_image.c:18
double Media_TweekCaptureFrameTime(double oldtime, double time)
Definition: m_mp3.c:3426
qbyte * ReadPCXPalette(qbyte *buf, int len, qbyte *out)
Definition: image.c:2919
void * Image_FlipImage(const void *inbuffer, void *outbuffer, int *inoutwidth, int *inoutheight, int pixelbytes, qboolean flipx, qboolean flipy, qboolean flipd)
cvar_t r_fullbright
Definition: renderer.c:337
int r_lightprepass
Definition: renderer.c:480
lightmapinfo_t ** lightmap
Definition: r_surf.c:48
void D3D11_UpdateFiltering(image_t *imagelist, int filtermip[3], int filterpic[3], int mipcap[2], float lodbias, float anis)
Definition: d3d11_backend.c:307
void Image_ChangeFormat(struct pendingtextureinfo *mips, qboolean *allowedformats, uploadfmt_t origfmt, const char *imagename)
cvar_t r_shadow_realtime_dlight_ambient
Definition: gl_shadow.c:64
int numlightmaps
Definition: r_surf.c:49
cvar_t r_glsl_offsetmapping
Definition: renderer.c:489
int rspeeds[RSPEED_MAX]
Definition: renderer.c:30
float Mod_GetFrameDuration(struct model_s *model, int surfaceidx, int frameno)
Definition: com_mesh.c:5863
cvar_t r_renderscale
Definition: renderer.c:224
void Media_VideoRestarting(void)
Definition: m_mp3.c:3920
cvar_t r_lightstylescale
Definition: renderer.c:190
void Renderer_Init(void)
Definition: renderer.c:753
void GLR_DrawPortal(struct batch_s *batch, struct batch_s **blist, struct batch_s *depthmasklist[2], int portaltype)
Definition: gl_rmain.c:1101
void Surf_SetupFrame(void)
Definition: r_surf.c:2173
void CL_ResetFog(int fogtype)
Definition: cl_main.c:1931
cvar_t gl_affinemodels
Definition: gl_rmain.c:52
void Media_WriteCurrentTrack(sizebuf_t *buf)
Definition: m_mp3.c:325
cvar_t r_meshroll
Definition: com_mesh.c:49
cvar_t r_slimealpha
Definition: renderer.c:236
void Mod_TouchModel(const char *name)
Definition: gl_model.c:899
cvar_t r_coronas_mindist
Definition: render.h:712
cvar_t gl_nocolors
Definition: renderer.c:109
qbyte * ReadPNGFile(const char *fname, qbyte *buf, int length, int *width, int *height, uploadfmt_t *format, qboolean force_rgb32)
Definition: image.c:1573
cvar_t r_drawentities
Definition: renderer.c:334
cvar_t r_dynamic
Definition: renderer.c:155
vec3_t vpn
Definition: render.h:330
void RQ_Shutdown(void)
Definition: renderque.c:161
texid_t balltexture
Definition: renderer.c:3000
cvar_t r_shadow_realtime_dlight_diffuse
Definition: gl_shadow.c:65
void Surf_BuildModelLightmaps(struct model_s *m)
Definition: r_surf.c:3720
cvar_t r_flashblendscale
Definition: render.h:712
entity_t r_worldentity
Definition: renderer.c:21
void Mod_UnRegisterModelFormat(void *module, int idx)
Definition: gl_model.c:978
void GLR_DrawWaterSurfaces(void)
void R_LightArrays(const entity_t *entity, vecV_t *coords, avec4_t *colours, int vertcount, vec3_t *normals, float scale, qboolean colormod)
Definition: com_mesh.c:795
void Mod_ModelLoaded(void *ctx, void *data, size_t a, size_t b)
Definition: gl_model.c:1011
void Mod_Init(qboolean initial)
Definition: gl_model.c:648
void Surf_GenBrushBatches(struct batch_s **batches, entity_t *ent)
Definition: r_surf.c:2285
qboolean RelightSetup(struct model_s *model, size_t lightsamples, qboolean generatelit)
Definition: ltface.c:1135
void Surf_StainSurf(struct model_s *mod, struct msurface_s *surf, float *parms)
Definition: r_surf.c:83
void Mod_SubmodelLoaded(struct model_s *mod, int state)
Definition: gl_model.c:1077
void D3D9_DestroyTexture(texid_t tex)
Definition: d3d_image.c:11
int Mod_RegisterModelFormatMagic(void *module, const char *formatname, qbyte *magic, size_t magicsize, qboolean(QDECL *load)(struct model_s *mod, void *buffer, size_t fsize))
void(_stdcall *qglFinish)(void)
image_t * Image_LoadTexture(const char *identifier, int width, int height, uploadfmt_t fmt, void *data, unsigned int flags)
qboolean R_RegisterVRDriver(void *module, struct plugvrfuncs_s *vrfuncs)
Definition: renderer.c:1137
void R_SetSky(const char *skyname)
Definition: gl_warp.c:72
void GLR_InitEfrags(void)
void D3D8_UpdateFiltering(image_t *imagelist, int filtermip[3], int filterpic[3], int mipcap[2], float anis)
void MYgluPerspective(double fovx, double fovy, double zNear, double zFar)
cvar_t r_xflip
Definition: gl_rmain.c:80
qprojection_t
Definition: render.h:236
@ PROJ_LAEA
Definition: render.h:241
@ PROJ_FISHEYE
Definition: render.h:239
@ PROJ_PANORAMA
Definition: render.h:240
@ PROJ_STANDARD
Definition: render.h:237
@ PROJ_STEREOGRAPHIC
Definition: render.h:238
@ PROJ_EQUIRECTANGULAR
Definition: render.h:242
qboolean Image_LoadTextureFromMemory(texid_t tex, int flags, const char *iname, const char *fname, qbyte *filedata, int filesize)
qboolean Image_FormatHasAlpha(uploadfmt_t encoding)
cvar_t r_wateralpha
Definition: renderer.c:232
struct model_s * Mod_FindName(const char *name)
Definition: gl_model.c:831
cvar_t r_netgraph
Definition: renderer.c:339
void R_BloomRegister(void)
Definition: gl_bloom.c:83
int Mod_SkinNumForName(struct model_s *model, int surfaceidx, const char *name)
Definition: com_mesh.c:5627
void R_SetRenderer(rendererinfo_t *ri)
Definition: renderer.c:1316
const size_t lightthreadctxsize
Definition: ltface.c:333
void D3D11_DestroyTexture(texid_t tex)
Definition: d3d11_image.c:25
cvar_t r_waterstyle
Definition: renderer.c:496
qboolean r_softwarebanding
Definition: renderer.c:217
qboolean R_RegisterRenderer(void *module, rendererinfo_t *ri)
Definition: renderer.c:1113
void R_RenderDlights(void)
Definition: gl_rlight.c:382
int Mod_RegisterModelFormatText(void *module, const char *formatname, char *magictext, qboolean(QDECL *load)(struct model_s *mod, void *buffer, size_t fsize))
void Surf_AddStain(vec3_t org, float red, float green, float blue, float radius)
Definition: r_surf.c:209
cvar_t r_novis
Definition: renderer.c:341
cvar_t r_slimestyle
Definition: renderer.c:497
void Surf_WipeStains(void)
Definition: r_surf.c:255
cvar_t r_waterwarp
Definition: renderer.c:343
cvar_t r_speeds
Definition: renderer.c:342
cvar_t r_lavaalpha
Definition: renderer.c:234
void R_GAlias_GenerateBatches(entity_t *e, struct batch_s **batches)
Definition: gl_alias.c:1718
int Mod_TagNumForName(struct model_s *model, const char *name, int firsttag)
Definition: com_mesh.c:5469
void Image_Upload(texid_t tex, uploadfmt_t fmt, void *data, void *palette, int width, int height, int depth, unsigned int flags)
cvar_t r_clearcolour
Definition: renderer.c:410
void GLVID_Console_Resize(void)
void Surf_RenderDynamicLightmaps(struct msurface_s *fa)
Definition: r_surf.c:1985
void Image_Premultiply(struct pendingtextureinfo *mips)
void Mod_UnRegisterAllModelFormats(void *module)
Definition: gl_model.c:999
imageflags
Definition: render.h:435
@ IF_WORLDTEX
Definition: render.h:464
@ IF_SPRITETEX
Definition: render.h:465
@ IF_NOGAMMA
Definition: render.h:448
@ IF_NEAREST
Definition: render.h:439
@ IF_SRGB
Definition: render.h:443
@ IF_LOWPRIORITY
Definition: render.h:471
@ IF_HIGHPRIORITY
Definition: render.h:470
@ IF_LOADNOW
Definition: render.h:472
@ IF_TRYBUMP
Definition: render.h:474
@ IF_EXACTEXTENSION
Definition: render.h:476
@ IF_TEXTYPEMASK
Definition: render.h:449
@ IF_MIPCAP
Definition: render.h:457
@ IF_INEXACT
Definition: render.h:462
@ IF_PALETTIZE
Definition: render.h:468
@ IF_NOPICMIP
Definition: render.h:446
@ IF_UNUSED15
Definition: render.h:460
@ IF_NOALPHA
Definition: render.h:447
@ IF_RENDERTARGET
Definition: render.h:475
@ IF_UIPIC
Definition: render.h:441
@ IF_NOPURGE
Definition: render.h:469
@ IF_LINEAR
Definition: render.h:440
@ IF_NOMIPMAP
Definition: render.h:438
@ IF_NOPCX
Definition: render.h:473
@ IF_UNUSED16
Definition: render.h:461
@ IF_NOSRGB
Definition: render.h:466
@ IF_PREMULTIPLYALPHA
Definition: render.h:458
@ IF_CLAMP
Definition: render.h:437
@ IF_NOREPLACE
Definition: render.h:477
@ IF_NOWORKER
Definition: render.h:478
cvar_t r_shadow_realtime_dlight_shadows
Definition: render.h:670
texid_t R_LoadReplacementTexture(const char *name, const char *subpath, unsigned int flags, void *lowres, int lowreswidth, int lowresheight, uploadfmt_t fmt)
cvar_t r_drawviewmodel
Definition: renderer.c:153
void R_InitSky(shader_t *shader, const char *skyname, uploadfmt_t fmt, qbyte *src, unsigned int width, unsigned int height)
Definition: gl_warp.c:1178
void Surf_Clear(struct model_s *mod)
Definition: r_surf.c:3347
cvar_t gl_finish
Definition: gl_rmain.c:53
qbyte GetPaletteIndex(int red, int green, int blue)
Definition: r_2d.c:86
cvar_t r_lightmap_saturation
Definition: renderer.c:186
void Surf_RenderAmbientLightmaps(struct msurface_s *fa, int ambient)
Definition: r_surf.c:2066
void RelightTerminate(struct model_s *mod)
Definition: ltface.c:1044
void Mod_LightmapAllocInit(lmalloc_t *lmallocator, qboolean hasdeluxe, unsigned int width, unsigned int height, int firstlm)
Definition: gl_model.c:3019
void R_UpdateLightStyle(unsigned int style, const char *stylestring, float r, float g, float b)
Definition: gl_rlight.c:44
void QDECL Surf_RebuildLightmap_Callback(struct cvar_s *var, char *oldvalue)
Definition: r_surf.c:77
qboolean R_DrawSkyChain(struct batch_s *batch)
Definition: gl_warp.c:381
qboolean Image_WriteDDSFile(const char *filename, enum fs_relative fsroot, struct pendingtextureinfo *mips)
void R_GAliasFlushSkinCache(qboolean final)
Definition: gl_alias.c:578
cvar_t r_lavastyle
Definition: renderer.c:498
void R_ShutdownRenderer(qboolean videotoo)
Definition: renderer.c:1359
qbyte * ReadPCXFile(qbyte *buf, int length, int *width, int *height)
Definition: image.c:2745
const char * Image_FormatName(uploadfmt_t encoding)
cvar_t r_lightstylesmooth_limit
Definition: renderer.c:188
image_t * Image_CreateTexture(const char *identifier, const char *subpath, unsigned int flags)
void LightPlane(struct relight_ctx_s *ctx, struct llightinfo_s *threadctx, lightstyleindex_t surf_styles[MAXCPULIGHTMAPS], unsigned int *surf_expsamples, qbyte *surf_rgbsamples, qbyte *surf_deluxesamples, vec4_t surf_plane, vec4_t surf_texplanes[2], vec2_t exactmins, vec2_t exactmaxs, int texmins[2], int texsize[2], float lmscale)
Definition: ltface.c:776
void D3D9_UpdateFiltering(image_t *imagelist, int filtermip[3], int filterpic[3], int mipcap[2], float lodbias, float anis)
Definition: d3d_backend.c:326
cvar_t r_meshpitch
Definition: com_mesh.c:47
void Mod_RebuildLightmaps(void)
Definition: gl_model.c:292
void Image_ReadExternalAlpha(qbyte *rgbadata, size_t imgwidth, size_t imgheight, const char *fname, uploadfmt_t *format)
int Surf_LightmapShift(struct model_s *model)
Definition: r_surf.c:66
int R_LightPoint(vec3_t p)
Definition: gl_rlight.c:2664
cvar_t r_temporalscenecache
Definition: r_surf.c:2956
texid_t ptritexture
Definition: renderer.c:3002
void R_BumpLightstyles(unsigned int maxstyle)
Definition: gl_rlight.c:34
struct model_s * currentmodel
Definition: r_surf.c:42
cvar_t r_shadow_playershadows
Definition: gl_shadow.c:67
cvar_t r_shadow_realtime_world_lightmaps
Definition: render.h:674
cvar_t r_coronas_occlusion
Definition: render.h:712
image_t * Image_FindTexture(const char *identifier, const char *subpath, unsigned int flags)
struct texture_s * R_TextureAnimation_Q2(struct texture_s *base)
Definition: renderer.c:2656
void R_Sky_Register(void)
Definition: gl_warp.c:1338
cvar_t r_telealpha
Definition: renderer.c:238
const char * RelightGetProgress(float *progress)
Definition: ltface.c:1149
void Image_Shutdown(void)
cvar_t gl_nohwblend
Definition: renderer.c:431
void RelightThink(void)
Definition: ltface.c:1161
cvar_t r_flashblend
Definition: render.h:712
cvar_t r_mirroralpha
Definition: renderer.c:338
cvar_t r_coronas_intensity
Definition: render.h:712
void R_SkyShutdown(void)
Definition: gl_warp.c:53
void Mod_WipeSkin(skinid_t id, qboolean force)
Definition: gl_alias.c:75
skinid_t Mod_RegisterSkinFile(const char *skinname)
Definition: gl_alias.c:431
void * ReadTargaFile(qbyte *buf, int length, int *width, int *height, uploadfmt_t *format, qboolean greyonly, uploadfmt_t forceformat)
Definition: image.c:449
void Image_DestroyTexture(image_t *tex)
qboolean R_CalcModelLighting(entity_t *e, struct model_s *clmodel)
Definition: gl_alias.c:1350
rendererinfo_t * ri
Definition: renderer.c:1110
enum uploadfmt uploadfmt_t
static ALC_API ALCvoid * buffer
Definition: snd_al.c:259
static spx_int16_t * in
Definition: snd_dma.c:488
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492
OggVorbis_File char * initial
Definition: snd_ov.c:46
Definition: gl_model.h:133
void(* buildfunc)(struct model_s *mod, struct msurface_s *surf, struct builddata_s *bd)
Definition: render.h:599
void * facedata
Definition: render.h:601
qboolean paintlightmaps
Definition: render.h:600
vec3_t angles
Definition: render.h:105
int flags
Definition: render.h:146
float scale
Definition: render.h:156
int h2playerclass
Definition: render.h:127
int abslight
Definition: render.h:163
int topcolour
Definition: render.h:124
float rotation
Definition: render.h:149
float fatness
Definition: render.h:159
vec3_t light_range
Definition: render.h:114
int keynum
Definition: render.h:103
struct shader_s * forcedshader
Definition: render.h:151
vec3_t origin
Definition: render.h:104
int playerindex
Definition: render.h:123
int bottomcolour
Definition: render.h:125
int drawflags
Definition: render.h:162
vec3_t oldorigin
Definition: render.h:117
vec3_t axis[3]
Definition: render.h:106
int light_known
Definition: render.h:112
vec3_t light_dir
Definition: render.h:115
refEntityType_t rtype
Definition: render.h:148
pvscache_t pvscache
Definition: render.h:153
skinid_t customskin
Definition: render.h:121
vec4_t shaderRGBAf
Definition: render.h:108
int skinnum
Definition: render.h:120
framestate_t framestate
Definition: render.h:144
vec3_t glowmod
Definition: render.h:110
float shaderTime
Definition: render.h:109
vec3_t light_avg
Definition: render.h:113
struct model_s * model
Definition: render.h:119
float glslpad1
Definition: render.h:209
float glslpad2
Definition: render.h:210
float time
Definition: render.h:217
vec3_t colour
Definition: render.h:205
float alpha
Definition: render.h:206
float density
Definition: render.h:207
float depthbias
Definition: render.h:208
unsigned short t
Definition: render.h:371
unsigned short b
Definition: render.h:371
unsigned short l
Definition: render.h:371
unsigned short r
Definition: render.h:371
texid_t lightmap_texture
Definition: render.h:376
int width
Definition: render.h:382
qboolean hasdeluxe
Definition: render.h:379
stmap * stainmaps
Definition: render.h:386
qbyte * lightmaps
Definition: render.h:385
uploadfmt_t fmt
Definition: render.h:380
int pbo_handle
Definition: render.h:388
qboolean modified
Definition: render.h:377
int height
Definition: render.h:383
qboolean external
Definition: render.h:378
glRect_t rectchange
Definition: render.h:384
qbyte pixbytes
Definition: render.h:381
int firstlm
Definition: render.h:424
unsigned int height
Definition: render.h:427
unsigned int width
Definition: render.h:426
qboolean deluxe
Definition: render.h:428
int lmnum
Definition: render.h:425
Definition: gl_model.h:90
Definition: gl_model.h:972
qbyte type
Definition: render.h:196
qbyte pad[2]
Definition: render.h:198
qbyte signbits
Definition: render.h:197
vec3_t normal
Definition: render.h:194
float dist
Definition: render.h:195
Definition: gl_model.h:459
size_t pendingtextureinfosize
Definition: render.h:513
qboolean canloadcubemaps
Definition: render.h:514
const char * loadername
Definition: render.h:512
Definition: bspfile.h:939
float fov_x
Definition: render.h:272
qbyte * forcedvis
Definition: render.h:320
int frustum_numworldplanes
Definition: render.h:294
stereomethod_t stereomethod
Definition: render.h:313
qboolean areabitsknown
Definition: render.h:321
vrect_t vrect
Definition: render.h:257
qboolean warndraw
Definition: render.h:326
vrect_t grect
Definition: render.h:256
vec3_t base_angles
Definition: render.h:267
vec3_t vieworg
Definition: render.h:260
rtname_t rt_ripplemap
Definition: render.h:317
float mindist
Definition: render.h:274
float m_projection_std[16]
Definition: render.h:287
rtname_t rt_destcolour[R_MAX_RENDERTARGETS]
Definition: render.h:314
float maxdist
Definition: render.h:274
vec3_t viewaxis[3]
Definition: render.h:262
vec4_t userdata[16]
Definition: render.h:324
playerview_t * playerview
Definition: render.h:281
rtname_t rt_sourcecolour
Definition: render.h:315
pxrect_t pxrect
Definition: render.h:305
vec3_t viewangles
Definition: render.h:261
vec3_t weaponmatrix[4]
Definition: render.h:269
vec3_t skyroom_pos
Definition: render.h:300
rtname_t rt_depth
Definition: render.h:316
qboolean useperspective
Definition: render.h:311
qboolean skyroom_enabled
Definition: render.h:302
qboolean externalview
Definition: render.h:306
float fovv_y
Definition: render.h:273
vec3_t eyeoffset
Definition: render.h:263
int flags
Definition: render.h:278
float time
Definition: render.h:284
vec4_t skyroom_spin
Definition: render.h:301
int firstvisedict
Definition: render.h:303
rtname_t nearenvmap
Definition: render.h:318
float fovv_x
Definition: render.h:273
vec3_t weaponmatrix_bob[4]
Definition: render.h:270
qboolean base_known
Definition: render.h:266
vec3_t base_origin
Definition: render.h:267
int dirty
Definition: render.h:279
int * sceneareas
Definition: render.h:291
qboolean drawsbar
Definition: render.h:276
unsigned int colourmask
Definition: render.h:310
float m_projection_view[16]
Definition: render.h:288
float hdr_value
Definition: render.h:298
float m_view[16]
Definition: render.h:289
qbyte * scenevis
Definition: render.h:290
float fov_y
Definition: render.h:272
vec3_t pvsorigin
Definition: render.h:259
mplane_t frustum[MAXFRUSTUMPLANES]
Definition: render.h:293
fogstate_t globalfog
Definition: render.h:297
qbyte areabits[MAX_MAP_AREA_BYTES]
Definition: render.h:322
int recurse
Definition: render.h:307
qboolean forcevis
Definition: render.h:308
int frustum_numplanes
Definition: render.h:295
qboolean drawcrosshair
Definition: render.h:277
vec2_t projectionoffset
Definition: render.h:264
float afov
Definition: render.h:272
unsigned int flipcull
Definition: render.h:309
unsigned int q1lower
Definition: render.h:180
texnums_t texnums
Definition: render.h:186
int maxmappings
Definition: render.h:174
int refcount
Definition: render.h:171
shader_t * shader
Definition: render.h:185
int needsfree
Definition: render.h:187
unsigned int q1upper
Definition: render.h:179
struct qwskin_s * qwskin
Definition: render.h:178
int nummappings
Definition: render.h:173
Definition: gl_model.h:365
netadr_t a
Definition: sv_master.c:141
unsigned char buf[KBRINGSIZE]
Definition: sys_dos.c:27
unsigned int flags
Definition: valid.c:313
ctx first
Definition: zone.c:587