Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Macros | Functions | Variables
rendergl.cpp File Reference
#include <SDL_opengl.h>
#include <boost/algorithm/clamp.hpp>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <list>
#include <memory>
#include <string>
#include "SDL_video.h"
#include "include/base/cef_ref_counted.h"
#include "include/cef_base.h"
#include "inexor/engine/blend.hpp"
#include "inexor/engine/console.hpp"
#include "inexor/engine/decal.hpp"
#include "inexor/engine/depthfx.hpp"
#include "inexor/engine/dynlight.hpp"
#include "inexor/engine/frame.hpp"
#include "inexor/engine/glare.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/grass.hpp"
#include "inexor/engine/lightmap.hpp"
#include "inexor/engine/material.hpp"
#include "inexor/engine/octa.hpp"
#include "inexor/engine/octaedit.hpp"
#include "inexor/engine/octarender.hpp"
#include "inexor/engine/octree.hpp"
#include "inexor/engine/pvs.hpp"
#include "inexor/engine/renderbackground.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/renderparticles.hpp"
#include "inexor/engine/rendersky.hpp"
#include "inexor/engine/rendertext.hpp"
#include "inexor/engine/renderva.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/engine/shadowmap.hpp"
#include "inexor/engine/water.hpp"
#include "inexor/engine/world.hpp"
#include "inexor/fpsgame/client.hpp"
#include "inexor/fpsgame/fps.hpp"
#include "inexor/fpsgame/player.hpp"
#include "inexor/fpsgame/render.hpp"
#include "inexor/io/Error.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/io/filesystem/mediadirs.hpp"
#include "inexor/io/legacy/stream.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/physics/physics.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_formatting.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/cubemap.hpp"
#include "inexor/texture/texsettings.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/InexorCefApp.hpp"
#include "inexor/ui/InexorRenderHandler.hpp"
#include "inexor/ui/input/InexorMouseManager.hpp"
#include "inexor/ui/layer/InexorAppLayer.hpp"
#include "inexor/ui/layer/InexorConsoleLayer.hpp"
#include "inexor/ui/layer/InexorHudLayer.hpp"
#include "inexor/ui/layer/InexorLayer.hpp"
#include "inexor/ui/layer/InexorLayerManager.hpp"
#include "inexor/ui/legacy/3dgui.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"
#include "inexor/util/legacy_time.hpp"

Namespaces

 modelpreview
 

Macros

#define CHECKPLANE(c, dir, focaldist, low, high)
 
#define HUDQUAD(x1, y1, x2, y2, sx1, sy1, sx2, sy2)
 
#define MAXCROSSHAIRS   4
 

Functions

 VAR (glversion, 1, 0, 0)
 
 VAR (glslversion, 1, 0, 0)
 
voidgetprocaddress (const char *name)
 
 VARP (ati_skybox_bug, 0, 0, 1)
 
 VAR (ati_minmax_bug, 0, 0, 1)
 
 VAR (ati_cubemap_bug, 0, 0, 1)
 
 VAR (intel_vertexarray_bug, 0, 0, 1)
 
 VAR (intel_mapbufferrange_bug, 0, 0, 1)
 
 VAR (minimizetcusage, 1, 0, 0)
 
 VAR (useubo, 1, 0, 0)
 
 VAR (usetexcompress, 1, 0, 0)
 
 VAR (rtscissor, 0, 1, 1)
 
 VAR (blurtile, 0, 1, 1)
 
 VAR (rtsharefb, 0, 1, 1)
 
 VAR (dbgexts, 0, 0, 1)
 
bool hasext (const char *exts, const char *ext)
 
void gl_checkextensions ()
 
void glext (char *ext)
 
 COMMAND (glext,"s")
 
void cef_resize (int width, int height)
 
void gl_resize ()
 
void gl_init (int depth, int fsaa)
 
 VAR (wireframe, 0, 0, 1)
 
 ICOMMAND (getcampitch,"",(), floatret(camera1->pitch))
 
 ICOMMAND (getcampos,"",(),{defformatstring(pos,"%s %s %s", floatstr(camera1->o.x), floatstr(camera1->o.y), floatstr(camera1->o.z));result(pos);})
 
 ICOMMAND (getcamroll,"",(), floatret(camera1->roll))
 
 ICOMMAND (getcamyaw,"",(), floatret(camera1->yaw))
 
void setcammatrix ()
 
void setcamprojmatrix (bool init=true, bool flush=false)
 
void resethudmatrix ()
 
void pushhudmatrix ()
 
void flushhudmatrix (bool flushparams)
 
void pophudmatrix (bool flush, bool flushparams)
 
void pushhudscale (float sx, float sy)
 
void pushhudtranslate (float tx, float ty, float sx, float sy)
 
void broadcastfov ()
 Send your field of view to all other clients. More...
 
 VARP (zoominvel, 0, 250, 5000)
 
 VARP (zoomoutvel, 0, 100, 5000)
 
 VARP (zoomfov, 10, 35, 150)
 
 VARFP (fov, 10, 100, 150, broadcastfov())
 
 VARP (followfov, 0, 1, 1)
 
 VAR (avatarzoomfov, 10, 25, 60)
 whether we adapt fov to the player we are currently spectating More...
 
 VAR (avatarfov, 10, 65, 150)
 
 FVAR (avatardepth, 0, 0.5f, 1)
 
 FVARNP (aspect, forceaspect, 0, 0, 1e3f)
 
 VARF (zoom,-1, 0, 1, broadcastfov())
 
void disablezoom ()
 
void computezoom ()
 
 FVARP (zoomsens, 1e-3f, 1, 1000)
 
 FVARP (zoomaccel, 0, 0, 1000)
 
 VARP (zoomautosens, 0, 1, 1)
 
 FVARP (sensitivity, 1e-3f, 3, 1000)
 
 FVARP (sensitivityscale, 1e-3f, 1, 1000)
 
 VARP (invmouse, 0, 0, 1)
 
 FVARP (mouseaccel, 0, 0, 1000)
 
 VAR (thirdperson, 0, 0, 2)
 
 FVAR (thirdpersondistance, 0, 20, 50)
 
 FVAR (thirdpersonup,-25, 0, 25)
 
 FVAR (thirdpersonside,-25, 0, 25)
 
bool isthirdperson ()
 
void fixcamerarange ()
 
void mousemove (int dx, int dy)
 
void recomputecamera ()
 
 FVAR (nearplane, 0.01f, 0.54f, 2.0f)
 
vec calcavatarpos (const vec &pos, float dist)
 
 VAR (reflectclip, 0, 6, 64)
 
 VAR (reflectclipavatar,-64, 0, 64)
 
void renderavatar ()
 
 FVAR (polygonoffsetfactor,-1e4f,-3.0f, 1e4f)
 
 FVAR (polygonoffsetunits,-1e4f,-3.0f, 1e4f)
 
 FVAR (depthoffset,-1e4f, 0.01f, 1e4f)
 
void enablepolygonoffset (GLenum type)
 
void disablepolygonoffset (GLenum type)
 
void calcspherescissor (const vec &center, float size, float &sx1, float &sy1, float &sx2, float &sy2)
 
int pushscissor (float sx1, float sy1, float sx2, float sy2)
 
void popscissor ()
 
static void setupscreenquad ()
 
static void cleanupscreenquad ()
 
void screenquad ()
 
static void setscreentexcoord (int i, float w, float h, float x=0, float y=0)
 
void screenquad (float sw, float sh)
 
void screenquadflipped (float sw, float sh)
 
void screenquad (float sw, float sh, float sw2, float sh2)
 
void screenquadoffset (float x, float y, float w, float h)
 
void screenquadoffset (float x, float y, float w, float h, float x2, float y2, float w2, float h2)
 
void hudquad (float x, float y, float w, float h, float tx, float ty, float tw, float th)
 
 VARR (fog, 16, 4000, 1000024)
 
 HVARFR (fogcolour, 0, 0x8099B3, 0xFFFFFF,{fogcolor=bvec((fogcolour >>16)&0xFF,(fogcolour >>8)&0xFF, fogcolour &0xFF);})
 
static float findsurface (int fogmat, const vec &v, int &abovemat)
 
static void blendfog (int fogmat, float blend, float logblend, float &start, float &end, vec &fogc)
 
void setfogcolor (const vec &v)
 
void zerofogcolor ()
 
void resetfogcolor ()
 
void pushfogcolor (const vec &v)
 
void popfogcolor ()
 
void setfogdist (float start, float end)
 
void clearfogdist ()
 
void resetfogdist ()
 
void pushfogdist (float start, float end)
 
void popfogdist ()
 
static void resetfog ()
 
static void setfog (int fogmat, float below=1, int abovemat=MAT_AIR)
 
static void setnofog (const vec &color=vec(0, 0, 0))
 
static void blendfogoverlay (int fogmat, float blend, vec &overlay)
 
void drawfogoverlay (int fogmat, float fogblend, int abovemat)
 
void rendergame (bool mainpass)
 
 VARP (skyboxglare, 0, 1, 1)
 
void drawglare ()
 
 VARP (reflectmms, 0, 1, 1)
 
 VARR (refractsky, 0, 0, 1)
 
void drawreflection (float z, bool refract, int fogdepth, const bvec &col)
 
void drawcubemap (int size, const vec &o, float yaw, float pitch, const cubemapside &side)
 
 VAR (modelpreviewfov, 10, 20, 100)
 
 VAR (modelpreviewpitch,-90,-15, 90)
 
void modelpreview::start (int x, int y, int w, int h, bool background)
 
void modelpreview::end ()
 
vec calcmodelpreviewpos (const vec &radius, float &yaw)
 
void clearminimap ()
 
 VARR (minimapheight, 0, 0, 2<< 16)
 
 HVARFR (minimapcolour, 0, 0, 0xFFFFFF,{minimapcolor=bvec((minimapcolour >>16)&0xFF,(minimapcolour >>8)&0xFF, minimapcolour &0xFF);})
 
 VARR (minimapclip, 0, 0, 1)
 
 VARFP (minimapsize, 7, 8, 10,{if(minimaptex) drawminimap();})
 
void bindminimap ()
 
void clipminimap (ivec &bbmin, ivec &bbmax, cube *c=worldroot, const ivec &co=ivec(0, 0, 0), int size=worldsize >>1)
 
void drawminimap ()
 
void drawtextures ()
 
void cleanupmotionblur ()
 
 VARFP (motionblur, 0, 0, 1,{if(!motionblur) cleanupmotionblur();})
 
 VARP (motionblurmillis, 1, 5, 1000)
 
 FVARP (motionblurscale, 0, 0.5f, 1)
 
void addmotionblur ()
 
void invalidatepostfx ()
 
void gl_drawhud (int w, int h)
 
void gl_rendercefmouse (int view_x, int view_y, int view_width, int view_height)
 
void gl_rendercef ()
 
void gl_drawframe ()
 
 VARP (new_ui, 0, 0, 1)
 
void gl_drawmainmenu ()
 
 VARNP (damagecompass, usedamagecompass, 0, 1, 1)
 
 VARP (damagecompassfade, 1, 1000, 10000)
 
 VARP (damagecompasssize, 1, 30, 100)
 
 VARP (damagecompassalpha, 1, 25, 100)
 
 VARP (damagecompassmin, 1, 25, 1000)
 
 VARP (damagecompassmax, 1, 200, 1000)
 
void damagecompass (int n, const vec &loc)
 
void drawdamagecompass (int w, int h)
 
 VARFP (damagescreen, 0, 1, 1,{if(!damagescreen) damageblendmillis=0;})
 
 VARP (damagescreenfactor, 1, 7, 100)
 
 VARP (damagescreenalpha, 1, 45, 100)
 
 VARP (damagescreenfade, 0, 125, 1000)
 
 VARP (damagescreenmin, 1, 10, 1000)
 
 VARP (damagescreenmax, 1, 100, 1000)
 
void damageblend (int n)
 
void bind_bomb_items_texture ()
 
void bind_items_texture ()
 Binds the specific item icon map and returns true on success. More...
 
void drawdamagescreen (int w, int h)
 
 VAR (hidestats, 0, 0, 1)
 
 VAR (hidehud, 0, 0, 1)
 
 VARP (crosshairsize, 0, 15, 50)
 
 VARP (cursorsize, 0, 30, 50)
 
 VARP (crosshairfx, 0, 1, 1)
 
 VARP (crosshaircolors, 0, 1, 1)
 
 SVARP (crosshairdir,"interface/crosshair")
 
void loadcrosshair (const char *name, int i)
 
void loadcrosshair_ (const char *name, int *i)
 
 COMMANDN (loadcrosshair, loadcrosshair_,"si")
 
 ICOMMAND (getcrosshair,"i",(int *i),{const char *name="";if(*i >=0 &&*i< MAXCROSSHAIRS){name=crosshairs[*i]?crosshairs[*i]->name:tempformatstring("%s/%s",*crosshairdir, game::defaultcrosshair(*i));}result(name);})
 
void writecrosshairs (stream *f)
 
 SVARFP (cursor,"interface/cursor/default.png", cursortex=NULL)
 
void draw_g3d_cursor (int w, int h)
 
void draw_crosshair (int w, int h)
 
void drawcrosshair (int w, int h)
 
 VARP (wallclock, 0, 0, 1)
 
 VARP (wallclock24, 0, 0, 1)
 
 VARP (wallclocksecs, 0, 0, 1)
 
 VARP (showfps, 0, 1, 1)
 
 VARP (showfpsrange, 0, 0, 1)
 
 VAR (showeditstats, 0, 0, 1)
 
 VAR (statrate, 1, 200, 1000)
 
 FVARP (conscale, 1e-3f, 0.33f, 1e3f)
 
void gl_drawhud ()
 
void cleanupgl ()
 

Variables

bool hasVAO = false
 
bool hasFBO = false
 
bool hasAFBO = false
 
bool hasDS = false
 
bool hasTF = false
 
bool hasTRG = false
 
bool hasTSW = false
 
bool hasS3TC = false
 
bool hasFXT1 = false
 
bool hasAF = false
 
bool hasFBB = false
 
bool hasUBO = false
 
bool hasMBR = false
 
int hasstencil = 0
 
PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays_ = nullptr
 
PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements_ = nullptr
 
PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate_ = nullptr
 
PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate_ = nullptr
 
PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate_ = nullptr
 
PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate_ = nullptr
 
PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate_ = nullptr
 
PFNGLGENBUFFERSPROC glGenBuffers_ = nullptr
 
PFNGLBINDBUFFERPROC glBindBuffer_ = nullptr
 
PFNGLMAPBUFFERPROC glMapBuffer_ = nullptr
 
PFNGLUNMAPBUFFERPROC glUnmapBuffer_ = nullptr
 
PFNGLBUFFERDATAPROC glBufferData_ = nullptr
 
PFNGLBUFFERSUBDATAPROC glBufferSubData_ = nullptr
 
PFNGLDELETEBUFFERSPROC glDeleteBuffers_ = nullptr
 
PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData_ = nullptr
 
PFNGLGENQUERIESPROC glGenQueries_ = nullptr
 
PFNGLDELETEQUERIESPROC glDeleteQueries_ = nullptr
 
PFNGLBEGINQUERYPROC glBeginQuery_ = nullptr
 
PFNGLENDQUERYPROC glEndQuery_ = nullptr
 
PFNGLGETQUERYIVPROC glGetQueryiv_ = nullptr
 
PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv_ = nullptr
 
PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv_ = nullptr
 
PFNGLCREATEPROGRAMPROC glCreateProgram_ = nullptr
 
PFNGLDELETEPROGRAMPROC glDeleteProgram_ = nullptr
 
PFNGLUSEPROGRAMPROC glUseProgram_ = nullptr
 
PFNGLCREATESHADERPROC glCreateShader_ = nullptr
 
PFNGLDELETESHADERPROC glDeleteShader_ = nullptr
 
PFNGLSHADERSOURCEPROC glShaderSource_ = nullptr
 
PFNGLCOMPILESHADERPROC glCompileShader_ = nullptr
 
PFNGLGETSHADERIVPROC glGetShaderiv_ = nullptr
 
PFNGLGETPROGRAMIVPROC glGetProgramiv_ = nullptr
 
PFNGLATTACHSHADERPROC glAttachShader_ = nullptr
 
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_ = nullptr
 
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog_ = nullptr
 
PFNGLLINKPROGRAMPROC glLinkProgram_ = nullptr
 
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation_ = nullptr
 
PFNGLUNIFORM1FPROC glUniform1f_ = nullptr
 
PFNGLUNIFORM2FPROC glUniform2f_ = nullptr
 
PFNGLUNIFORM3FPROC glUniform3f_ = nullptr
 
PFNGLUNIFORM4FPROC glUniform4f_ = nullptr
 
PFNGLUNIFORM1FVPROC glUniform1fv_ = nullptr
 
PFNGLUNIFORM2FVPROC glUniform2fv_ = nullptr
 
PFNGLUNIFORM3FVPROC glUniform3fv_ = nullptr
 
PFNGLUNIFORM4FVPROC glUniform4fv_ = nullptr
 
PFNGLUNIFORM1IPROC glUniform1i_ = nullptr
 
PFNGLUNIFORM2IPROC glUniform2i_ = nullptr
 
PFNGLUNIFORM3IPROC glUniform3i_ = nullptr
 
PFNGLUNIFORM4IPROC glUniform4i_ = nullptr
 
PFNGLUNIFORM1IVPROC glUniform1iv_ = nullptr
 
PFNGLUNIFORM2IVPROC glUniform2iv_ = nullptr
 
PFNGLUNIFORM3IVPROC glUniform3iv_ = nullptr
 
PFNGLUNIFORM4IVPROC glUniform4iv_ = nullptr
 
PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv_ = nullptr
 
PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv_ = nullptr
 
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv_ = nullptr
 
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation_ = nullptr
 
PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform_ = nullptr
 
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray_ = nullptr
 
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray_ = nullptr
 
PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f_ = nullptr
 
PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv_ = nullptr
 
PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s_ = nullptr
 
PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv_ = nullptr
 
PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f_ = nullptr
 
PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv_ = nullptr
 
PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s_ = nullptr
 
PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv_ = nullptr
 
PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f_ = nullptr
 
PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv_ = nullptr
 
PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s_ = nullptr
 
PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv_ = nullptr
 
PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f_ = nullptr
 
PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv_ = nullptr
 
PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s_ = nullptr
 
PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv_ = nullptr
 
PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv_ = nullptr
 
PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv_ = nullptr
 
PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv_ = nullptr
 
PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv_ = nullptr
 
PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv_ = nullptr
 
PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv_ = nullptr
 
PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv_ = nullptr
 
PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub_ = nullptr
 
PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv_ = nullptr
 
PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv_ = nullptr
 
PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv_ = nullptr
 
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer_ = nullptr
 
PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv_ = nullptr
 
PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv_ = nullptr
 
PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv_ = nullptr
 
PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv_ = nullptr
 
PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv_ = nullptr
 
PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv_ = nullptr
 
PFNGLDRAWBUFFERSPROC glDrawBuffers_ = nullptr
 
PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer_ = nullptr
 
PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers_ = nullptr
 
PFNGLGENFRAMEBUFFERSPROC glGenRenderbuffers_ = nullptr
 
PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage_ = nullptr
 
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus_ = nullptr
 
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer_ = nullptr
 
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers_ = nullptr
 
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers_ = nullptr
 
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D_ = nullptr
 
PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer_ = nullptr
 
PFNGLGENERATEMIPMAPPROC glGenerateMipmap_ = nullptr
 
PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer_ = nullptr
 
PFNGLGETUNIFORMINDICESPROC glGetUniformIndices_ = nullptr
 
PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv_ = nullptr
 
PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex_ = nullptr
 
PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv_ = nullptr
 
PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding_ = nullptr
 
PFNGLBINDBUFFERBASEPROC glBindBufferBase_ = nullptr
 
PFNGLBINDBUFFERRANGEPROC glBindBufferRange_ = nullptr
 
PFNGLMAPBUFFERRANGEPROC glMapBufferRange_ = nullptr
 
PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange_ = nullptr
 
PFNGLBINDVERTEXARRAYPROC glBindVertexArray_ = nullptr
 
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays_ = nullptr
 
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays_ = nullptr
 
PFNGLISVERTEXARRAYPROC glIsVertexArray_ = nullptr
 
vec worldpos
 
vec camdir
 
vec camright
 
vec camup
 
matrix4 hudmatrix
 
matrix4 hudmatrixstack [64]
 
int hudmatrixpos = 0
 
float curfov = 100
 
float curavatarfov = 65
 
float fovy
 
float aspect
 
int farplane
 
static float zoomprogress = 0
 
physentcamera1 = nullptr
 special ent that acts as camera, same object as player1 in FPS mode More...
 
bool detachedcamera = false
 
const matrix4 viewmatrix (vec(-1, 0, 0), vec(0, 0, 1), vec(0,-1, 0))
 
matrix4 cammatrix
 
matrix4 projmatrix
 
matrix4 camprojmatrix
 
matrix4 invcammatrix
 
matrix4 invcamprojmatrix
 
matrix4 clipmatrix
 
matrix4 noclipmatrix
 
matrix4 nooffsetmatrix
 
static int scissoring = 0
 
static GLint oldscissor [4]
 
static GLuint screenquadvbo = 0
 
static LocalShaderParam screentexcoord [2] = { LocalShaderParam("screentexcoord0"), LocalShaderParam("screentexcoord1") }
 
bvec fogcolor (0x80, 0x99, 0xB3)
 
vec oldfogcolor (0, 0, 0)
 
vec curfogcolor (0, 0, 0)
 
float oldfogstart = 0
 
float oldfogend = 1000000
 
float curfogstart = 0
 
float curfogend = 1000000
 
bool renderedgame = false
 
matrix4 noreflectmatrix
 
int drawtex = 0
 
physentmodelpreview::oldcamera
 
physent modelpreview::camera
 
float modelpreview::oldaspect
 
float modelpreview::oldfovy
 
float modelpreview::oldfov
 
int modelpreview::oldfarplane
 
GLuint minimaptex = 0
 
vec minimapcenter (0, 0, 0)
 
vec minimapradius (0, 0, 0)
 
vec minimapscale (0, 0, 0)
 
bvec minimapcolor (0, 0, 0)
 
bool deferdrawtextures = false
 
GLuint motiontex = 0
 
int motionw = 0
 
int motionh = 0
 
int lastmotion = 0
 
bool dopostfx = false
 
int xtraverts
 
int xtravertsva
 
float damagedirs [8] = { 0, 0, 0, 0, 0, 0, 0, 0 }
 
int damageblendmillis = 0
 
static Texturecrosshairs [MAXCROSSHAIRS] = { nullptr, nullptr, nullptr, nullptr }
 
static Texturecursortex = nullptr
 

Macro Definition Documentation

#define CHECKPLANE (   c,
  dir,
  focaldist,
  low,
  high 
)
Value:
do { \
float nzc = (cz*cz + 1) / (cz dir drt) - cz, \
pz = (d##c)/(nzc*e.c - e.z); \
if(pz > 0) \
{ \
float c = (focaldist)*nzc, \
pc = pz*nzc; \
if(pc < e.c) low = c; \
else if(pc > e.c) high = c; \
} \
} while(0)
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2
int d
Definition: octaedit.cpp:1749
#define dir(name, v, d, s, os)
Definition: physics.cpp:2014

Referenced by calcspherescissor().

#define HUDQUAD (   x1,
  y1,
  x2,
  y2,
  sx1,
  sy1,
  sx2,
  sy2 
)
Value:
{ \
gle::defvertex(2); \
gle::deftexcoord0(); \
gle::begin(GL_TRIANGLE_STRIP); \
gle::attribf(x2, y1); gle::attribf(sx2, sy1); \
gle::attribf(x1, y1); gle::attribf(sx1, sy1); \
gle::attribf(x2, y2); gle::attribf(sx2, sy2); \
gle::attribf(x1, y2); gle::attribf(sx1, sy2); \
}
void begin(GLenum mode)
Definition: glemu.cpp:220
void end()
Definition: rendergl.cpp:1706

Referenced by hudquad().

#define MAXCROSSHAIRS   4

Referenced by loadcrosshair(), and writecrosshairs().

Function Documentation

void addmotionblur ( )
void bind_bomb_items_texture ( )
void bind_items_texture ( )

Binds the specific item icon map and returns true on success.

References DIR_UI, inexor::filesystem::getmediapath(), Texture::id, and textureload().

Referenced by game::drawicon().

void bindminimap ( )
static void blendfog ( int  fogmat,
float  blend,
float  logblend,
float &  start,
float &  end,
vec fogc 
)
static
static void blendfogoverlay ( int  fogmat,
float  blend,
vec overlay 
)
static
void broadcastfov ( )

Send your field of view to all other clients.

References game::broadcastfov().

Referenced by disablezoom().

vec calcavatarpos ( const vec pos,
float  dist 
)
vec calcmodelpreviewpos ( const vec radius,
float &  yaw 
)
void calcspherescissor ( const vec center,
float  size,
float &  sx1,
float &  sy1,
float &  sx2,
float &  sy2 
)
void cef_resize ( int  width,
int  height 
)
void cleanupgl ( )
void cleanupmotionblur ( )

References lastmotion, motionh, motiontex, and motionw.

Referenced by cleanupgl().

static void cleanupscreenquad ( )
static

References glDeleteBuffers_, and screenquadvbo.

Referenced by cleanupgl().

void clearfogdist ( )

References setfogdist().

Referenced by modelpreview::start().

void clearminimap ( )

References minimaptex.

Referenced by cleanupgl(), and drawminimap().

void clipminimap ( ivec bbmin,
ivec bbmax,
cube c = worldroot,
const ivec co = ivec(0, 0, 0),
int  size = worldsize>>1 
)
COMMAND ( glext  ,
"s"   
)
COMMANDN ( loadcrosshair  ,
loadcrosshair_  ,
"si"   
)
void computezoom ( )
void damageblend ( int  n)
void damagecompass ( int  n,
const vec loc 
)
void disablepolygonoffset ( GLenum  type)
void disablezoom ( )
void draw_crosshair ( int  w,
int  h 
)
void draw_g3d_cursor ( int  w,
int  h 
)
void drawcrosshair ( int  w,
int  h 
)
void drawcubemap ( int  size,
const vec o,
float  yaw,
float  pitch,
const cubemapside side 
)
void drawdamagecompass ( int  w,
int  h 
)
void drawdamagescreen ( int  w,
int  h 
)
void drawfogoverlay ( int  fogmat,
float  fogblend,
int  abovemat 
)
void drawglare ( )
void drawminimap ( )
void drawreflection ( float  z,
bool  refract,
int  fogdepth,
const bvec col 
)
void drawtextures ( )
void enablepolygonoffset ( GLenum  type)
static float findsurface ( int  fogmat,
const vec v,
int &  abovemat 
)
static
void fixcamerarange ( )

References camera1, physent::pitch, and physent::yaw.

Referenced by mousemove().

void flushhudmatrix ( bool  flushparams)
FVAR ( avatardepth  ,
,
0.  5f,
 
)
FVAR ( thirdpersondistance  ,
,
20  ,
50   
)
FVAR ( thirdpersonup  ,
25,
,
25   
)
FVAR ( thirdpersonside  ,
25,
,
25   
)
FVAR ( nearplane  ,
0.  01f,
0.  54f,
2.  0f 
)
FVAR ( polygonoffsetfactor  ,
1e4f,
-3.  0f,
1e4f   
)
FVAR ( polygonoffsetunits  ,
1e4f,
-3.  0f,
1e4f   
)
FVAR ( depthoffset  ,
1e4f,
0.  01f,
1e4f   
)
FVARNP ( aspect  ,
forceaspect  ,
,
,
1e3f   
)
FVARP ( zoomsens  ,
1e-  3f,
,
1000   
)
FVARP ( zoomaccel  ,
,
,
1000   
)
FVARP ( sensitivity  ,
1e-  3f,
,
1000   
)
FVARP ( sensitivityscale  ,
1e-  3f,
,
1000   
)
FVARP ( mouseaccel  ,
,
,
1000   
)
FVARP ( motionblurscale  ,
,
0.  5f,
 
)
FVARP ( conscale  ,
1e-  3f,
0.  33f,
1e3f   
)
void* getprocaddress ( const char *  name)

Referenced by gl_checkextensions().

void gl_checkextensions ( )

References blurdepthfx, depthfxsize, fatal(), getprocaddress(), glActiveTexture_, glAttachShader_, glBeginQuery_, glBindAttribLocation_, glBindBuffer_, glBindBufferBase_, glBindBufferRange_, glBindFramebuffer_, glBindRenderbuffer_, glBindVertexArray_, glBlendColor_, glBlendEquation_, glBlendEquationSeparate_, glBlendFuncSeparate_, glBlitFramebuffer_, glBufferData_, glBufferSubData_, glCheckFramebufferStatus_, glCompileShader_, glCompressedTexImage1D_, glCompressedTexImage2D_, glCompressedTexImage3D_, glCompressedTexSubImage1D_, glCompressedTexSubImage2D_, glCompressedTexSubImage3D_, glCopyTexSubImage3D_, glCreateProgram_, glCreateShader_, glDeleteBuffers_, glDeleteFramebuffers_, glDeleteProgram_, glDeleteQueries_, glDeleteRenderbuffers_, glDeleteShader_, glDeleteVertexArrays_, glDisableVertexAttribArray_, glDrawBuffers_, glDrawRangeElements_, glEnableVertexAttribArray_, glEndQuery_, glFlushMappedBufferRange_, glFramebufferRenderbuffer_, glFramebufferTexture2D_, glGenBuffers_, glGenerateMipmap_, glGenFramebuffers_, glGenQueries_, glGenRenderbuffers_, glGenVertexArrays_, glGetActiveUniform_, glGetActiveUniformBlockiv_, glGetActiveUniformsiv_, glGetBufferSubData_, glGetCompressedTexImage_, glGetProgramInfoLog_, glGetProgramiv_, glGetQueryiv_, glGetQueryObjectiv_, glGetQueryObjectuiv_, glGetShaderInfoLog_, glGetShaderiv_, glGetUniformBlockIndex_, glGetUniformIndices_, glGetUniformLocation_, glIsVertexArray_, glLinkProgram_, glMapBuffer_, glMapBufferRange_, glMultiDrawArrays_, glMultiDrawElements_, glRenderbufferStorage_, glShaderSource_, glslversion, glStencilFuncSeparate_, glStencilMaskSeparate_, glStencilOpSeparate_, glTexImage3D_, glTexSubImage3D_, glUniform1f_, glUniform1fv_, glUniform1i_, glUniform1iv_, glUniform2f_, glUniform2fv_, glUniform2i_, glUniform2iv_, glUniform3f_, glUniform3fv_, glUniform3i_, glUniform3iv_, glUniform4f_, glUniform4fv_, glUniform4i_, glUniform4iv_, glUniformBlockBinding_, glUniformMatrix2fv_, glUniformMatrix2x3fv_, glUniformMatrix2x4fv_, glUniformMatrix3fv_, glUniformMatrix3x2fv_, glUniformMatrix3x4fv_, glUniformMatrix4fv_, glUniformMatrix4x2fv_, glUniformMatrix4x3fv_, glUnmapBuffer_, glUseProgram_, glversion, glVertexAttrib1f_, glVertexAttrib1fv_, glVertexAttrib1s_, glVertexAttrib1sv_, glVertexAttrib2f_, glVertexAttrib2fv_, glVertexAttrib2s_, glVertexAttrib2sv_, glVertexAttrib3f_, glVertexAttrib3fv_, glVertexAttrib3s_, glVertexAttrib3sv_, glVertexAttrib4bv_, glVertexAttrib4f_, glVertexAttrib4fv_, glVertexAttrib4iv_, glVertexAttrib4Nbv_, glVertexAttrib4Niv_, glVertexAttrib4Nub_, glVertexAttrib4Nubv_, glVertexAttrib4Nuiv_, glVertexAttrib4Nusv_, glVertexAttrib4s_, glVertexAttrib4sv_, glVertexAttrib4ubv_, glVertexAttrib4uiv_, glVertexAttrib4usv_, glVertexAttribPointer_, hasAF, hasAFBO, hasDS, hasext(), hasFBB, hasFBO, hasFXT1, hasMBR, hasS3TC, hasTF, hasTRG, hasTSW, hasUBO, hasVAO, hwcubetexsize, hwmaxaniso, hwtexsize, intel_mapbufferrange_bug, Log, inexor::rpc::max(), MAXDYNLIGHTS, reservevpparams, rtsharefb, shadowmap, inexor::util::log_manager::std, usetexcompress, and waterfallrefract.

Referenced by main().

void gl_drawframe ( )
void gl_drawhud ( int  w,
int  h 
)

Referenced by gl_drawframe(), and gl_drawmainmenu().

void gl_drawhud ( )
void gl_drawmainmenu ( )
void gl_init ( int  depth,
int  fsaa 
)
void gl_rendercef ( )
void gl_rendercefmouse ( int  view_x,
int  view_y,
int  view_width,
int  view_height 
)
void gl_resize ( )
void glext ( char *  ext)

References hasext(), and intret().

bool hasext ( const char *  exts,
const char *  ext 
)

References cur.

Referenced by gl_checkextensions(), and glext().

void hudquad ( float  x,
float  y,
float  w,
float  h,
float  tx,
float  ty,
float  tw,
float  th 
)
HVARFR ( fogcolour  ,
,
0x8099B3  ,
0xFFFFFF  ,
{fogcolor=bvec((fogcolour >>16)&0xFF,(fogcolour >>8)&0xFF, fogcolour &0xFF);}   
)
HVARFR ( minimapcolour  ,
,
,
0xFFFFFF  ,
{minimapcolor=bvec((minimapcolour >>16)&0xFF,(minimapcolour >>8)&0xFF, minimapcolour &0xFF);}   
)
ICOMMAND ( getcampitch  ,
""  ,
()  ,
floatret(camera1->pitch)   
)
ICOMMAND ( getcampos  ,
""  ,
()  ,
{defformatstring(pos,"%s %s %s", floatstr(camera1->o.x), floatstr(camera1->o.y), floatstr(camera1->o.z));result(pos);}   
)
ICOMMAND ( getcamroll  ,
""  ,
()  ,
floatret(camera1->roll)   
)
ICOMMAND ( getcamyaw  ,
""  ,
()  ,
floatret(camera1->yaw)   
)
ICOMMAND ( getcrosshair  ,
"i"  ,
(int *i)  ,
{const char *name="";if(*i >=0 &&*i< MAXCROSSHAIRS){name=crosshairs[*i]?crosshairs[*i]->name:tempformatstring("%s/%s",*crosshairdir, game::defaultcrosshair(*i));}result(name);}   
)
void invalidatepostfx ( )

References dopostfx.

Referenced by allchanged(), and commitchanges().

bool isthirdperson ( )
void loadcrosshair ( const char *  name,
int  i 
)
void loadcrosshair_ ( const char *  name,
int *  i 
)

References loadcrosshair().

void mousemove ( int  dx,
int  dy 
)
void popfogcolor ( )

References curfogcolor, oldfogcolor, and resetfogcolor().

Referenced by drawglare(), and drawreflection().

void popfogdist ( )
void pophudmatrix ( bool  flush,
bool  flushparams 
)
void popscissor ( )

References oldscissor, and scissoring.

void pushfogcolor ( const vec v)

References curfogcolor, oldfogcolor, and resetfogcolor().

Referenced by drawglare(), and drawreflection().

void pushfogdist ( float  start,
float  end 
)
void pushhudmatrix ( )
void pushhudscale ( float  sx,
float  sy 
)
void pushhudtranslate ( float  tx,
float  ty,
float  sx,
float  sy 
)
int pushscissor ( float  sx1,
float  sy1,
float  sx2,
float  sy2 
)
void recomputecamera ( )
void renderavatar ( )
void rendergame ( bool  mainpass)
static void resetfog ( )
static

References curfogcolor, resetfogcolor(), and resetfogdist().

Referenced by setfog(), and setnofog().

void resetfogcolor ( )
void resetfogdist ( )
void resethudmatrix ( )
void screenquad ( )
void screenquad ( float  sw,
float  sh 
)
void screenquad ( float  sw,
float  sh,
float  sw2,
float  sh2 
)
void screenquadflipped ( float  sw,
float  sh 
)

References screenquad(), and setscreentexcoord().

Referenced by recorder::readbuffer().

void screenquadoffset ( float  x,
float  y,
float  w,
float  h 
)
void screenquadoffset ( float  x,
float  y,
float  w,
float  h,
float  x2,
float  y2,
float  w2,
float  h2 
)
void setcammatrix ( )
void setcamprojmatrix ( bool  init = true,
bool  flush = false 
)
static void setfog ( int  fogmat,
float  below = 1,
int  abovemat = MAT_AIR 
)
static
void setfogcolor ( const vec v)

References fogcolor, and GLOBALPARAM.

Referenced by changeslottmus(), resetfogcolor(), and zerofogcolor().

void setfogdist ( float  start,
float  end 
)

References GLOBALPARAMF.

Referenced by clearfogdist(), and resetfogdist().

static void setnofog ( const vec color = vec(0, 0, 0))
static
static void setscreentexcoord ( int  i,
float  w,
float  h,
float  x = 0,
float  y = 0 
)
inlinestatic
static void setupscreenquad ( )
static
SVARFP ( cursor  ,
"interface/cursor/default.png"  ,
cursortex  = NULL 
)
SVARP ( crosshairdir  ,
"interface/crosshair"   
)
VAR ( glversion  ,
,
,
 
)
VAR ( glslversion  ,
,
,
 
)
VAR ( ati_minmax_bug  ,
,
,
 
)
VAR ( ati_cubemap_bug  ,
,
,
 
)
VAR ( intel_vertexarray_bug  ,
,
,
 
)
VAR ( intel_mapbufferrange_bug  ,
,
,
 
)
VAR ( minimizetcusage  ,
,
,
 
)
VAR ( useubo  ,
,
,
 
)
VAR ( usetexcompress  ,
,
,
 
)
VAR ( rtscissor  ,
,
,
 
)
VAR ( blurtile  ,
,
,
 
)
VAR ( rtsharefb  ,
,
,
 
)
VAR ( dbgexts  ,
,
,
 
)
VAR ( wireframe  ,
,
,
 
)
VAR ( avatarzoomfov  ,
10  ,
25  ,
60   
)

whether we adapt fov to the player we are currently spectating

VAR ( avatarfov  ,
10  ,
65  ,
150   
)
VAR ( thirdperson  ,
,
,
 
)
VAR ( reflectclip  ,
,
,
64   
)
VAR ( reflectclipavatar  ,
64,
,
64   
)
VAR ( modelpreviewfov  ,
10  ,
20  ,
100   
)
VAR ( modelpreviewpitch  ,
90,
15,
90   
)
VAR ( hidestats  ,
,
,
 
)
VAR ( hidehud  ,
,
,
 
)
VAR ( showeditstats  ,
,
,
 
)
VAR ( statrate  ,
,
200  ,
1000   
)
VARF ( zoom  ,
1,
,
,
broadcastfov()   
)
VARFP ( fov  ,
10  ,
100  ,
150  ,
broadcastfov()   
)
VARFP ( minimapsize  ,
,
,
10  ,
{if(minimaptex) drawminimap();}   
)
VARFP ( motionblur  ,
,
,
,
{if(!motionblur) cleanupmotionblur();}   
)
VARFP ( damagescreen  ,
,
,
,
{if(!damagescreen) damageblendmillis=0;}   
)
VARNP ( damagecompass  ,
usedamagecompass  ,
,
,
 
)
VARP ( ati_skybox_bug  ,
,
,
 
)
VARP ( zoominvel  ,
,
250  ,
5000   
)
VARP ( zoomoutvel  ,
,
100  ,
5000   
)
VARP ( zoomfov  ,
10  ,
35  ,
150   
)
VARP ( followfov  ,
,
,
 
)
VARP ( zoomautosens  ,
,
,
 
)
VARP ( invmouse  ,
,
,
 
)
VARP ( skyboxglare  ,
,
,
 
)
VARP ( reflectmms  ,
,
,
 
)
VARP ( motionblurmillis  ,
,
,
1000   
)
VARP ( new_ui  ,
,
,
 
)
VARP ( damagecompassfade  ,
,
1000  ,
10000   
)
VARP ( damagecompasssize  ,
,
30  ,
100   
)
VARP ( damagecompassalpha  ,
,
25  ,
100   
)
VARP ( damagecompassmin  ,
,
25  ,
1000   
)
VARP ( damagecompassmax  ,
,
200  ,
1000   
)
VARP ( damagescreenfactor  ,
,
,
100   
)
VARP ( damagescreenalpha  ,
,
45  ,
100   
)
VARP ( damagescreenfade  ,
,
125  ,
1000   
)
VARP ( damagescreenmin  ,
,
10  ,
1000   
)
VARP ( damagescreenmax  ,
,
100  ,
1000   
)
VARP ( crosshairsize  ,
,
15  ,
50   
)
VARP ( cursorsize  ,
,
30  ,
50   
)
VARP ( crosshairfx  ,
,
,
 
)
VARP ( crosshaircolors  ,
,
,
 
)
VARP ( wallclock  ,
,
,
 
)
VARP ( wallclock24  ,
,
,
 
)
VARP ( wallclocksecs  ,
,
,
 
)
VARP ( showfps  ,
,
,
 
)
VARP ( showfpsrange  ,
,
,
 
)
VARR ( fog  ,
16  ,
4000  ,
1000024   
)
VARR ( refractsky  ,
,
,
 
)
VARR ( minimapheight  ,
,
,
2<<  16 
)
VARR ( minimapclip  ,
,
,
 
)
void writecrosshairs ( stream f)
void zerofogcolor ( )

Variable Documentation

float aspect
vec camdir
physent* camera1 = nullptr

special ent that acts as camera, same object as player1 in FPS mode

Referenced by adddecal(), adddynlight(), flarerenderer::addflare(), addvisibleva(), calcavatarpos(), calcmodelpreviewpos(), calcshadowmapbb(), calcwatersubdiv(), inexor::sound::checkmapsounds(), cullmodel(), damagecompass(), shadowmaptexture::dorender(), game::hideandseekclientmode::drawblip(), game::ctfclientmode::drawblip(), game::bombclientmode::drawblip(), game::collectclientmode::drawblip(), game::captureclientmode::drawblips(), drawcubemap(), game::drawminimap(), drawminimap(), drawreflection(), drawreflections(), drawskybox(), game::drawteammate(), gui::end(), modelpreview::end(), endmodelbatches(), fireballrenderer::finddepthfxranges(), finddynlights(), findreflectedvas(), findvisiblemms(), fixcamerarange(), g3d_addgui(), g3d_key(), g3d_mainmenu(), generategrass(), gengrassquads(), genpos< PT_TAPE >(), gl_drawframe(), game::ctfclientmode::interpflagpos(), isthirdperson(), lockpvs_(), main(), flarerenderer::makelightflares(), menuinfrontofplayer(), mousemove(), newentity(), flarerenderer::newflare(), particle_text(), particle_textcopy(), phystest(), inexor::sound::playsound(), queryreflection(), recomputecamera(), regularshape(), animmodel::part::render(), ai::render(), rendercullmodelquery(), renderentselection(), rendergeom(), renderlightning(), rendermapmodels(), rendermaterials(), fireballrenderer::renderpart(), game::bombclientmode::renderplayersposindicator(), renderwater(), setcammatrix(), setupgeom(), texturegui::show(), sortmaterials(), splash(), gui::start(), modelpreview::start(), testpvs(), inexor::sound::updatechannel(), updateparticles(), and updateskystats().

matrix4 cammatrix
matrix4 camprojmatrix
vec camright
vec camup
matrix4 clipmatrix

Referenced by drawreflection().

Texture* crosshairs[MAXCROSSHAIRS] = { nullptr, nullptr, nullptr, nullptr }
static
float curavatarfov = 65
vec curfogcolor(0, 0, 0)
float curfogend = 1000000
float curfogstart = 0
float curfov = 100
Texture* cursortex = nullptr
static

Referenced by draw_g3d_cursor().

int damageblendmillis = 0

Referenced by damageblend(), and drawdamagescreen().

float damagedirs[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }

Referenced by damagecompass(), and drawdamagecompass().

bool deferdrawtextures = false

Referenced by drawtextures(), and gl_drawframe().

bool detachedcamera = false
bool dopostfx = false

Referenced by invalidatepostfx().

int drawtex = 0
int farplane
bvec fogcolor(0x80, 0x99, 0xB3)
float fovy
PFNGLATTACHSHADERPROC glAttachShader_ = nullptr
PFNGLBEGINQUERYPROC glBeginQuery_ = nullptr

Referenced by gl_checkextensions().

PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation_ = nullptr
PFNGLBINDBUFFERPROC glBindBuffer_ = nullptr
PFNGLBINDBUFFERBASEPROC glBindBufferBase_ = nullptr

Referenced by gl_checkextensions().

PFNGLBINDBUFFERRANGEPROC glBindBufferRange_ = nullptr

Referenced by gl_checkextensions().

PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer_ = nullptr
PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer_ = nullptr
PFNGLBINDVERTEXARRAYPROC glBindVertexArray_ = nullptr

Referenced by gl_checkextensions(), and gle::setup().

PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate_ = nullptr

Referenced by gl_checkextensions().

PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate_ = nullptr

Referenced by gl_checkextensions().

PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer_ = nullptr
PFNGLBUFFERDATAPROC glBufferData_ = nullptr
PFNGLBUFFERSUBDATAPROC glBufferSubData_ = nullptr
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus_ = nullptr
PFNGLCOMPILESHADERPROC glCompileShader_ = nullptr
PFNGLCREATEPROGRAMPROC glCreateProgram_ = nullptr
PFNGLCREATESHADERPROC glCreateShader_ = nullptr
PFNGLDELETEBUFFERSPROC glDeleteBuffers_ = nullptr
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers_ = nullptr
PFNGLDELETEPROGRAMPROC glDeleteProgram_ = nullptr
PFNGLDELETEQUERIESPROC glDeleteQueries_ = nullptr
PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers_ = nullptr
PFNGLDELETESHADERPROC glDeleteShader_ = nullptr
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays_ = nullptr

Referenced by gle::cleanup(), and gl_checkextensions().

PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray_ = nullptr
PFNGLDRAWBUFFERSPROC glDrawBuffers_ = nullptr

Referenced by gl_checkextensions().

PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray_ = nullptr
PFNGLENDQUERYPROC glEndQuery_ = nullptr

Referenced by gl_checkextensions().

PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange_ = nullptr

Referenced by gl_checkextensions().

PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer_ = nullptr
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D_ = nullptr
PFNGLGENBUFFERSPROC glGenBuffers_ = nullptr
PFNGLGENERATEMIPMAPPROC glGenerateMipmap_ = nullptr

Referenced by gl_checkextensions().

PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers_ = nullptr
PFNGLGENQUERIESPROC glGenQueries_ = nullptr
PFNGLGENFRAMEBUFFERSPROC glGenRenderbuffers_ = nullptr
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays_ = nullptr

Referenced by gl_checkextensions(), and gle::setup().

PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform_ = nullptr
PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv_ = nullptr
PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv_ = nullptr
PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData_ = nullptr

Referenced by gl_checkextensions(), and readva().

PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_ = nullptr

Referenced by gl_checkextensions(), and showglslinfo().

PFNGLGETPROGRAMIVPROC glGetProgramiv_ = nullptr
PFNGLGETQUERYIVPROC glGetQueryiv_ = nullptr

Referenced by gl_checkextensions().

PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv_ = nullptr

Referenced by checkquery(), and gl_checkextensions().

PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv_ = nullptr

Referenced by checkquery(), and gl_checkextensions().

PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog_ = nullptr

Referenced by gl_checkextensions(), and showglslinfo().

PFNGLGETSHADERIVPROC glGetShaderiv_ = nullptr
PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex_ = nullptr
PFNGLGETUNIFORMINDICESPROC glGetUniformIndices_ = nullptr
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation_ = nullptr
PFNGLISVERTEXARRAYPROC glIsVertexArray_ = nullptr

Referenced by gl_checkextensions().

PFNGLLINKPROGRAMPROC glLinkProgram_ = nullptr
PFNGLMAPBUFFERPROC glMapBuffer_ = nullptr

Referenced by gl_checkextensions().

PFNGLMAPBUFFERRANGEPROC glMapBufferRange_ = nullptr
PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays_ = nullptr

Referenced by gle::end(), and gl_checkextensions().

PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements_ = nullptr

Referenced by gl_checkextensions().

PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage_ = nullptr
PFNGLSHADERSOURCEPROC glShaderSource_ = nullptr
PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate_ = nullptr

Referenced by gl_checkextensions().

PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate_ = nullptr

Referenced by gl_checkextensions().

PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORM1FPROC glUniform1f_ = nullptr
PFNGLUNIFORM1FVPROC glUniform1fv_ = nullptr
PFNGLUNIFORM1IPROC glUniform1i_ = nullptr
PFNGLUNIFORM1IVPROC glUniform1iv_ = nullptr
PFNGLUNIFORM2FPROC glUniform2f_ = nullptr
PFNGLUNIFORM2FVPROC glUniform2fv_ = nullptr
PFNGLUNIFORM2IPROC glUniform2i_ = nullptr
PFNGLUNIFORM2IVPROC glUniform2iv_ = nullptr
PFNGLUNIFORM3FPROC glUniform3f_ = nullptr
PFNGLUNIFORM3FVPROC glUniform3fv_ = nullptr
PFNGLUNIFORM3IPROC glUniform3i_ = nullptr
PFNGLUNIFORM3IVPROC glUniform3iv_ = nullptr
PFNGLUNIFORM4FPROC glUniform4f_ = nullptr
PFNGLUNIFORM4FVPROC glUniform4fv_ = nullptr
PFNGLUNIFORM4IPROC glUniform4i_ = nullptr
PFNGLUNIFORM4IVPROC glUniform4iv_ = nullptr
PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding_ = nullptr
PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv_ = nullptr
PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv_ = nullptr
PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv_ = nullptr
PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLUNMAPBUFFERPROC glUnmapBuffer_ = nullptr
PFNGLUSEPROGRAMPROC glUseProgram_ = nullptr
PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f_ = nullptr
PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv_ = nullptr

Referenced by gl_checkextensions(), and gle::tangent().

PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub_ = nullptr

Referenced by gle::color(), and gl_checkextensions().

PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv_ = nullptr

Referenced by gle::color(), and gl_checkextensions().

PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv_ = nullptr

Referenced by gl_checkextensions().

PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer_ = nullptr
bool hasAF = false
bool hasAFBO = false

Referenced by gl_checkextensions().

bool hasDS = false
bool hasFBB = false
bool hasFBO = false

Referenced by gl_checkextensions().

bool hasFXT1 = false

Referenced by gl_checkextensions().

bool hasMBR = false

Referenced by gl_checkextensions().

bool hasS3TC = false

Referenced by gendds(), gl_checkextensions(), and loaddds().

int hasstencil = 0
bool hasTF = false
bool hasTRG = false
bool hasTSW = false

Referenced by gl_checkextensions().

bool hasUBO = false
bool hasVAO = false

Referenced by gl_checkextensions().

matrix4 hudmatrix
int hudmatrixpos = 0
matrix4 hudmatrixstack[64]

Referenced by pophudmatrix(), and pushhudmatrix().

matrix4 invcammatrix

Referenced by drawreflection(), and setcamprojmatrix().

matrix4 invcamprojmatrix

Referenced by calcavatarpos(), and setcamprojmatrix().

int lastmotion = 0

Referenced by addmotionblur(), and cleanupmotionblur().

vec minimapcenter(0, 0, 0)

Referenced by game::drawminimap(), and drawminimap().

bvec minimapcolor(0, 0, 0)

Referenced by drawminimap().

vec minimapradius(0, 0, 0)
vec minimapscale(0, 0, 0)

Referenced by game::drawminimap(), and drawminimap().

GLuint minimaptex = 0
int motionh = 0

Referenced by addmotionblur(), and cleanupmotionblur().

GLuint motiontex = 0

Referenced by addmotionblur(), and cleanupmotionblur().

int motionw = 0

Referenced by addmotionblur(), and cleanupmotionblur().

matrix4 noclipmatrix
matrix4 nooffsetmatrix
matrix4 noreflectmatrix

Referenced by drawreflection().

vec oldfogcolor(0, 0, 0)

Referenced by popfogcolor(), and pushfogcolor().

float oldfogend = 1000000

Referenced by popfogdist(), and pushfogdist().

float oldfogstart = 0

Referenced by popfogdist(), and pushfogdist().

GLint oldscissor[4]
static

Referenced by popscissor(), and pushscissor().

matrix4 projmatrix
bool renderedgame = false
int scissoring = 0
static
GLuint screenquadvbo = 0
static
LocalShaderParam screentexcoord[2] = { LocalShaderParam("screentexcoord0"), LocalShaderParam("screentexcoord1") }
static

Referenced by setscreentexcoord().

const matrix4 viewmatrix(vec(-1, 0, 0), vec(0, 0, 1), vec(0,-1, 0))

Referenced by setcammatrix().

vec worldpos
int xtraverts
int xtravertsva
float zoomprogress = 0
static

Referenced by computezoom(), and disablezoom().