All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Go to the documentation of this file.
1 #pragma once
3 #include "SDL_opengl.h" // for GLenum
4 #include "inexor/network/SharedVar.hpp" // for SharedVar
5 #include "inexor/shared/geom.hpp" // for vec, matrix4, bvec
7 struct physent;
8 struct stream;
11 extern physent *camera1;
12 extern vec worldpos, camdir, camright, camup;
14 extern int xtraverts, xtravertsva;
16 extern void disablezoom();
18 extern vec calcavatarpos(const vec &pos, float dist);
19 extern vec calcmodelpreviewpos(const vec &radius, float &yaw);
21 extern void damageblend(int n);
22 extern void damagecompass(int n, const vec &loc);
25 extern void bindminimap();
27 extern void bind_items_texture();
28 extern void bind_bomb_items_texture();
30 extern matrix4 hudmatrix;
31 extern void resethudmatrix();
32 extern void pushhudmatrix();
33 extern void flushhudmatrix(bool flushparams = true);
34 extern void pophudmatrix(bool flush = true, bool flushparams = true);
35 extern void pushhudscale(float sx, float sy = 0);
36 extern void pushhudtranslate(float tx, float ty, float sx = 0, float sy = 0);
39 extern int hasstencil;
45 extern float curfov, fovy, aspect;
46 extern int drawtex;
47 extern bool renderedgame;
48 extern const matrix4 viewmatrix;
50 extern bvec fogcolor;
51 extern vec curfogcolor;
52 extern SharedVar<int> fog;
53 extern float curfogstart, curfogend;
55 extern void gl_checkextensions();
56 extern void gl_init(int depth, int fsaa);
57 extern void gl_resize();
58 extern void cef_resize(int width, int height);
59 extern void cleangl();
60 extern void rendergame(bool mainpass = false);
61 extern void invalidatepostfx();
62 extern void gl_drawframe();
63 extern void gl_drawmainmenu();
64 extern void gl_drawhud();
65 extern void drawminimap();
66 extern void drawtextures();
67 extern void enablepolygonoffset(GLenum type);
68 extern void disablepolygonoffset(GLenum type);
69 extern void calcspherescissor(const vec &center, float size, float &sx1, float &sy1, float &sx2, float &sy2);
70 extern int pushscissor(float sx1, float sy1, float sx2, float sy2);
71 extern void popscissor();
72 extern void recomputecamera();
73 extern void screenquad();
74 extern void screenquad(float sw, float sh);
75 extern void screenquadflipped(float sw, float sh);
76 extern void screenquad(float sw, float sh, float sw2, float sh2);
77 extern void screenquadoffset(float x, float y, float w, float h);
78 extern void screenquadoffset(float x, float y, float w, float h, float x2, float y2, float w2, float h2);
79 extern void hudquad(float x, float y, float w, float h, float tx = 0, float ty = 0, float tw = 1, float th = 1);
80 extern void setfogcolor(const vec &v);
81 extern void zerofogcolor();
82 extern void resetfogcolor();
83 extern void setfogdist(float start, float end);
84 extern void clearfogdist();
85 extern void resetfogdist();
86 extern void writecrosshairs(stream *f);
88 namespace modelpreview
89 {
90  extern void start(int x, int y, int w, int h, bool background = true);
91  extern void end();
92 }
vec calcavatarpos(const vec &pos, float dist)
Definition: rendergl.cpp:980
bvec fogcolor
vec camdir
Definition: rendergl.cpp:698
void recomputecamera()
Definition: rendergl.cpp:910
bool hasTSW
Definition: rendergl.cpp:83
void resetfogdist()
Definition: rendergl.cpp:1320
void setfogcolor(const vec &v)
Definition: rendergl.cpp:1282
bool hasFBO
Definition: rendergl.cpp:83
GLenum GLsizei GLsizei height
Definition: glexts.hpp:291
SharedVar< int > fsaa
void rendergame(bool mainpass=false)
Definition: rendergl.cpp:1415
int xtravertsva
Definition: rendergl.cpp:1943
SharedVar< int > glslversion
const matrix4 viewmatrix
void pushhudscale(float sx, float sy=0)
Definition: rendergl.cpp:785
void gl_resize()
Definition: rendergl.cpp:657
vec camup
Definition: rendergl.cpp:698
void gl_drawhud()
Definition: rendergl.cpp:2408
vec worldpos
Definition: rendergl.cpp:698
void writecrosshairs(stream *f)
Definition: rendergl.cpp:2317
void clearfogdist()
Definition: rendergl.cpp:1315
bool hasAF
Definition: rendergl.cpp:83
GLenum GLsizei width
Definition: glexts.hpp:291
void calcspherescissor(const vec &center, float size, float &sx1, float &sy1, float &sx2, float &sy2)
Definition: rendergl.cpp:1050
SharedVar< int > glversion
void screenquadoffset(float x, float y, float w, float h)
Definition: rendergl.cpp:1192
matrix4 camprojmatrix
Definition: rendergl.cpp:976
matrix4 projmatrix
Definition: rendergl.cpp:976
bool hasTF
Definition: rendergl.cpp:83
Definition: ents.hpp:128
Definition: rendergl.hpp:42
int pushscissor(float sx1, float sy1, float sx2, float sy2)
Definition: rendergl.cpp:1090
vec minimapcenter
ICOMMAND * f(float *a, float *b), floatret(*a **b)
void disablepolygonoffset(GLenum type)
Definition: rendergl.cpp:1038
bool hasVAO
Definition: rendergl.cpp:83
float curfogstart
Definition: rendergl.cpp:1280
void start(int x, int y, int w, int h, bool background)
Definition: rendergl.cpp:1665
void damagecompass(int n, const vec &loc)
Definition: rendergl.cpp:2153
int drawtex
Definition: rendergl.cpp:1587
vec curfogcolor
void cleangl()
void resethudmatrix()
Definition: rendergl.cpp:757
void hudquad(float x, float y, float w, float h, float tx=0, float ty=0, float tw=1, float th=1)
Definition: rendergl.cpp:1216
vec calcmodelpreviewpos(const vec &radius, float &yaw)
Definition: rendergl.cpp:1728
void drawminimap()
Definition: rendergl.cpp:1771
void invalidatepostfx()
Definition: rendergl.cpp:1936
float fovy
Definition: rendergl.cpp:802
void pushhudmatrix()
Definition: rendergl.cpp:763
bool renderedgame
Definition: rendergl.cpp:1413
void start(const char *filename, int videofps, int videow, int videoh, bool sound)
Definition: movie.cpp:975
void resetfogcolor()
Definition: rendergl.cpp:1292
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
void screenquadflipped(float sw, float sh)
Definition: rendergl.cpp:1179
SharedVar< int > fog
Definition: rendergl.hpp:42
float curfogend
Definition: rendergl.cpp:1280
Definition: geom.hpp:1572
int xtraverts
Definition: rendergl.cpp:1943
3-dimensional UNSIGNED CHAR vector.
Definition: geom.hpp:1398
bool hasFXT1
Definition: rendergl.cpp:83
void gl_drawframe()
Definition: rendergl.cpp:2028
matrix4 cammatrix
Definition: rendergl.cpp:976
void setfogdist(float start, float end)
Definition: rendergl.cpp:1310
matrix4 invcammatrix
Definition: rendergl.cpp:976
matrix4 hudmatrix
Definition: rendergl.cpp:754
void pushhudtranslate(float tx, float ty, float sx=0, float sy=0)
Definition: rendergl.cpp:793
matrix4 invcamprojmatrix
Definition: rendergl.cpp:976
Legacy file system streams.
Definition: stream.hpp:22
void flushhudmatrix(bool flushparams=true)
Definition: rendergl.cpp:769
bool hasAFBO
Definition: rendergl.cpp:83
virtual bool flush()
Definition: stream.hpp:44
void bind_items_texture()
Binds the specific item icon map and returns true on success.
Definition: rendergl.cpp:2239
Definition: rendergl.hpp:42
void damageblend(int n)
Definition: rendergl.cpp:2218
int end()
Definition: glemu.cpp:256
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
bool hasDS
Definition: rendergl.cpp:83
vec minimapscale
bool hasFBB
Definition: rendergl.cpp:83
void end()
Definition: rendergl.cpp:1706
bool hasS3TC
Definition: rendergl.cpp:83
float aspect
Definition: rendergl.cpp:802
void enablepolygonoffset(GLenum type)
Definition: rendergl.cpp:1022
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
void gl_drawmainmenu()
Definition: rendergl.cpp:2130
void screenquad()
Definition: rendergl.cpp:1155
void disablezoom()
Definition: rendergl.cpp:819
vec camright
Definition: rendergl.cpp:698
void bind_bomb_items_texture()
Definition: rendergl.cpp:2226
mathmatics for vectors, matrices, quaterions and more
void bindminimap()
Definition: rendergl.cpp:1752
bool hasTRG
Definition: rendergl.cpp:83
void cef_resize(int width, int height)
Definition: rendergl.cpp:645
void gl_checkextensions()
Definition: rendergl.cpp:280
Definition: rendergl.hpp:42
physent * camera1
special ent that acts as camera, same object as player1 in FPS mode
Definition: rendergl.cpp:868
bool hasMBR
Definition: rendergl.cpp:83
void pophudmatrix(bool flush=true, bool flushparams=true)
Definition: rendergl.cpp:775
int hasstencil
Definition: rendergl.cpp:84
SharedVar< float > forceaspect
void zerofogcolor()
Definition: rendergl.cpp:1287
float curfov
Definition: rendergl.cpp:802
void gl_init(int depth, int fsaa)
Definition: rendergl.cpp:663
void drawtextures()
Definition: rendergl.cpp:1877
vec minimapradius
bool hasUBO
Definition: rendergl.cpp:83
void popscissor()
Definition: rendergl.cpp:1129