Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
renderva.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <SDL_opengl.h> // for GL_SAMPLES_PASSED
3 
4 #include "inexor/engine/glexts.hpp" // for glBeginQuery_, glEndQuery_
5 #include "inexor/engine/octree.hpp" // for occludequery, vtxarray (ptr ...
6 #include "inexor/network/SharedVar.hpp" // for SharedVar
7 #include "inexor/shared/geom.hpp" // for ivec (ptr only), vec
8 
10 
11 extern void visiblecubes(bool cull = true);
12 extern void setvfcP(float z = -1, const vec &bbmin = vec(-1, -1, -1), const vec &bbmax = vec(1, 1, 1));
13 extern void savevfcP();
14 extern void restorevfcP();
15 extern void rendergeom(float causticspass = 0, bool fogpass = false);
16 extern void renderalphageom(bool fogpass = false);
17 extern void rendermapmodels();
18 extern void renderreflectedgeom(bool causticspass = false, bool fogpass = false);
19 extern void renderreflectedmapmodels();
20 extern void renderoutline();
21 extern bool rendersky(bool explicitonly = false);
22 
24 extern void resetinvalidtextslots();
25 
26 extern bool isfoggedsphere(float rad, const vec &cv);
27 extern int isvisiblesphere(float rad, const vec &cv);
28 extern bool bboccluded(const ivec &bo, const ivec &br);
29 extern occludequery *newquery(void *owner);
30 extern bool checkquery(occludequery *query, bool nowait = false);
31 extern void resetqueries();
32 extern int getnumqueries();
33 extern void startbb(bool mask = true);
34 extern void endbb(bool mask = true);
35 extern void drawbb(const ivec &bo, const ivec &br);
36 
37 extern SharedVar<int> oqfrags;
38 
39 #define startquery(query) do { glBeginQuery_(GL_SAMPLES_PASSED, ((occludequery *)(query))->id); } while(0)
40 #define endquery(query) do { glEndQuery_(GL_SAMPLES_PASSED); } while(0)
vtxarray * visibleva
Definition: renderva.cpp:62
void restorevfcP()
Definition: renderva.cpp:219
void resetqueries()
Definition: renderva.cpp:321
bool rendersky(bool explicitonly=false)
Definition: renderva.cpp:1927
int isvisiblesphere(float rad, const vec &cv)
Definition: renderva.cpp:71
void drawbb(const ivec &bo, const ivec &br)
Definition: renderva.cpp:421
void setvfcP(float z=-1, const vec &bbmin=vec(-1,-1,-1), const vec &bbmax=vec(1, 1, 1))
Definition: renderva.cpp:198
void visiblecubes(bool cull=true)
Definition: renderva.cpp:225
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition: glexts.hpp:299
bool isfoggedsphere(float rad, const vec &cv)
Definition: renderva.cpp:64
Definition: octree.hpp:101
void rendermapmodels()
Definition: renderva.cpp:547
void resetinvalidtextslots()
Resets the set of slots that an error has been reported for.
Definition: renderva.cpp:1095
occludequery * newquery(void *owner)
Definition: renderva.cpp:316
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
bool bboccluded(const ivec &bo, const ivec &br)
Definition: renderva.cpp:621
void savevfcP()
Definition: renderva.cpp:214
void renderoutline()
Definition: renderva.cpp:652
int br
Definition: octaedit.cpp:1749
void renderalphageom(bool fogpass=false)
Definition: renderva.cpp:1765
void startbb(bool mask=true)
Definition: renderva.cpp:394
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
void renderreflectedgeom(bool causticspass=false, bool fogpass=false)
Definition: renderva.cpp:1867
bool checkquery(occludequery *query, bool nowait=false)
Definition: renderva.cpp:334
vtxarray * reflectedva
Definition: renderva.cpp:497
void renderreflectedmapmodels()
Definition: renderva.cpp:499
void rendergeom(float causticspass=0, bool fogpass=false)
Definition: renderva.cpp:1578
void endbb(bool mask=true)
Definition: renderva.cpp:409
mathmatics for vectors, matrices, quaterions and more
Definition: octree.hpp:142
SharedVar< int > oqfrags
3-dimensional INTEGER vectors
Definition: geom.hpp:1226
int getnumqueries()
Definition: renderva.cpp:305