Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
depthfx.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL_opengl.h> // for GLenum
4 
5 #include "inexor/engine/rendertarget.hpp" // for rendertarget
6 #include "inexor/network/SharedVar.hpp" // for SharedVar
7 #include "inexor/shared/geom.hpp"
8 
10 extern int numdepthfxranges;
11 extern bool depthfxing;
12 
13 
15 {
16  const GLenum *colorformats() const override;
17 
18  float eyedepth(const vec &p) const;
19 
20  void addscissorvert(const vec &v, float &sx1, float &sy1, float &sx2, float &sy2);
21 
22  bool addscissorbox(const vec &center, float size);
23 
24  bool addscissorbox(const vec &bbmin, const vec &bbmax);
25 
26  bool screenrect() const override { return true; }
27  bool filter() const override { return blurdepthfx!=0; }
28  bool highprecision() const;
29  bool emulatehighprecision() const;
30 
31  bool shouldrender() override;
32 
33  bool dorender() override;
34 
35  void dodebug(int w, int h) override;
36 };
38 extern bool depthfxing;
39 
40 extern void cleanupdepthfx();
41 
42 extern void viewdepthfxtex();
43 
44 extern bool binddepthfxtex();
45 
46 extern void binddepthfxparams(float blend, float minblend = 0, bool allow = true, void *owner = nullptr);
47 
48 extern void drawdepthfxtex();
49 
50 
typedef GLenum(APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target)
const GLenum * colorformats() const override
Definition: depthfx.cpp:74
void dodebug(int w, int h) override
Definition: depthfx.cpp:120
bool binddepthfxtex()
Definition: depthfx.cpp:175
int numdepthfxranges
Definition: depthfx.cpp:21
bool dorender() override
Definition: depthfx.cpp:88
bool screenrect() const override
Definition: depthfx.hpp:26
void drawdepthfxtex()
Definition: depthfx.cpp:225
void viewdepthfxtex()
Definition: depthfx.cpp:167
void addscissorvert(const vec &v, float &sx1, float &sy1, float &sx2, float &sy2)
Definition: depthfx.cpp:50
SharedVar< int > depthfxscissor
bool filter() const override
Definition: depthfx.hpp:27
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
depthfxtexture depthfxtex
Definition: depthfx.cpp:44
Definition: depthfx.hpp:14
float eyedepth(const vec &p) const
Definition: depthfx.cpp:46
SharedVar< int > depthfxsize
bool emulatehighprecision() const
Definition: depthfx.cpp:86
bool highprecision() const
Definition: depthfx.cpp:79
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
Definition: rendertarget.hpp:24
SharedVar< int > depthfx
SharedVar< int > blurdepthfx
SharedVar< int > depthfxpartblend
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
SharedVar< int > depthfxbias
SharedVar< int > depthfxscale
bool shouldrender() override
Definition: depthfx.cpp:81
void binddepthfxparams(float blend, float minblend=0, bool allow=true, void *owner=nullptr)
Definition: depthfx.cpp:187
mathmatics for vectors, matrices, quaterions and more
bool depthfxing
Definition: depthfx.hpp:38
SharedVar< int > depthfxblend
bool addscissorbox(const vec &center, float size)
Definition: depthfx.cpp:58
void cleanupdepthfx()
Definition: depthfx.cpp:162