Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Functions | Variables
decal.cpp File Reference
#include <SDL_opengl.h>
#include <math.h>
#include <stddef.h>
#include <algorithm>
#include <memory>
#include "inexor/engine/decal.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/glexts.hpp"
#include "inexor/engine/material.hpp"
#include "inexor/engine/octa.hpp"
#include "inexor/engine/octree.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/engine/world.hpp"
#include "inexor/io/Logging.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_tools.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/util/legacy_time.hpp"

Classes

struct  decalvert
 
struct  decalinfo
 
struct  decalrenderer
 

Macros

#define GENFACEORIENT(orient, v0, v1, v2, v3)
 
#define GENFACEVERT(orient, vert, x, y, z, xv, yv, zv)   pos[numverts++] = vec(x xv, y yv, z zv);
 

Enumerations

enum  {
  DF_RND4 = 1<<0, DF_ROTATE = 1<<1, DF_INVMOD = 1<<2, DF_OVERBRIGHT = 1<<3,
  DF_ADD = 1<<4, DF_SATURATE = 1<<5
}
 

Functions

 VARFP (maxdecaltris, 1, 1024, 16384, initdecals())
 
 VARP (decalfade, 1000, 10000, 60000)
 
 VAR (dbgdec, 0, 0, 1)
 
void initdecals ()
 
void cleardecals ()
 
void cleanupdecals ()
 
 VARNP (decals, showdecals, 0, 1, 1)
 
void renderdecals (bool mainpass)
 
 VARP (maxdecaldistance, 1, 512, 10000)
 
void adddecal (int type, const vec &center, const vec &surface, float radius, const bvec &color, int info)
 

Variables

decalrenderer decals []
 

Class Documentation

struct decalvert
Class Members
bvec4 color
vec pos
vec2 tc
struct decalinfo
Class Members
bvec color
ushort endvert
int millis
ushort startvert

Macro Definition Documentation

#define GENFACEORIENT (   orient,
  v0,
  v1,
  v2,
  v3 
)
Value:
case orient: \
planes[0][dimension(orient)] = dimcoord(orient) ? 1 : -1; \
v0 v1 v2 v3 \
break;
#define dimcoord(orient)
Definition: octree.hpp:339
#define dimension(orient)
Definition: octree.hpp:338
int orient
Definition: octaedit.cpp:164
#define GENFACEVERT (   orient,
  vert,
  x,
  y,
  z,
  xv,
  yv,
  zv 
)    pos[numverts++] = vec(x xv, y yv, z zv);

Enumeration Type Documentation

anonymous enum
Enumerator
DF_RND4 
DF_ROTATE 
DF_INVMOD 
DF_OVERBRIGHT 
DF_ADD 
DF_SATURATE 

Function Documentation

void adddecal ( int  type,
const vec center,
const vec surface,
float  radius,
const bvec color,
int  info 
)
void cleanupdecals ( )

References decalrenderer::cleanup(), and loopi().

Referenced by resetgl().

void cleardecals ( )

References decalrenderer::cleardecals(), and loopi().

Referenced by resetmap().

void initdecals ( )

References decalrenderer::init(), and loopi().

Referenced by main().

void renderdecals ( bool  mainpass)
VAR ( dbgdec  ,
,
,
 
)
VARFP ( maxdecaltris  ,
,
1024  ,
16384  ,
initdecals()   
)
VARNP ( decals  ,
showdecals  ,
,
,
 
)
VARP ( decalfade  ,
1000  ,
10000  ,
60000   
)
VARP ( maxdecaldistance  ,
,
512  ,
10000   
)

Variable Documentation

decalrenderer decals[]
Initial value:
=
{
decalrenderer("<grey>particle/scorch.png", DF_ROTATE, 500),
decalrenderer("<grey>particle/blood.png", DF_RND4|DF_ROTATE|DF_INVMOD),
decalrenderer("<grey>particle/bullet.png", DF_OVERBRIGHT)
}
Definition: decal.cpp:47
Definition: decal.cpp:57
Definition: decal.cpp:45
Definition: decal.cpp:46
Definition: decal.cpp:48

Referenced by renderbackground().