Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Enumerations | Functions | Variables
gle Namespace Reference

Classes

struct  attribinfo
 

Enumerations

enum  {
  ATTRIB_VERTEX = 0, ATTRIB_COLOR = 1, ATTRIB_TEXCOORD0 = 2, ATTRIB_TEXCOORD1 = 3,
  ATTRIB_NORMAL = 4, ATTRIB_TANGENT = 5, ATTRIB_BONEWEIGHT = 6, ATTRIB_BONEINDEX = 7,
  MAXATTRIBS = 8
}
 

Functions

void enablequads ()
 
void disablequads ()
 
void drawquads (int offset, int count)
 
void defattrib (int type, int size, int format)
 
void defattribs (const char *fmt)
 
static void setattrib (const attribinfo &a, uchar *buf)
 
static void unsetattrib (const attribinfo &a)
 
static void setattribs (uchar *buf)
 
void begin (GLenum mode)
 
void begin (GLenum mode, int numverts)
 
void multidraw ()
 
int end ()
 
void forcedisable ()
 
void setup ()
 
void cleanup ()
 
static void disable ()
 
static void color (const bvec &v, uchar alpha=255)
 
static void color (const bvec4 &v)
 
static void normal (float x, float y, float z)
 
static void normal (const vec &v)
 
static void tangent (float x, float y, float z, float w=1.0f)
 
static void tangent (const vec &v, float w=1.0f)
 
static void tangent (const vec4 &v)
 
static void enableattrib (int index)
 
static void disableattrib (int index)
 
static void bindebo (GLuint ebo)
 
static void clearebo ()
 
static void bindvbo (GLuint vbo)
 
static void clearvbo ()
 
template<class T >
static void attrib (T x)
 
template<class T >
static void attrib (T x, T y)
 
template<class T >
static void attrib (T x, T y, T z)
 
template<class T >
static void attrib (T x, T y, T z, T w)
 
template<size_t N, class T >
static void attribv (const T *v)
 
static void attrib (const vec &v)
 
static void attrib (const vec &v, float w)
 
static void attrib (const vec2 &v)
 
static void attrib (const vec4 &v)
 
static void attrib (const ivec &v)
 
static void attrib (const ivec &v, int w)
 
static void attrib (const ivec2 &v)
 
static void attrib (const ivec4 &v)
 
static void attrib (const bvec &b)
 
static void attrib (const bvec &b, uchar w)
 
static void attrib (const bvec4 &b)
 
static void disable ()
 

Variables

const char *const attribnames [MAXATTRIBS] = { "vvertex", "vcolor", "vtexcoord0", "vtexcoord1", "vnormal", "vtangent", "vboneweight", "vboneindex" }
 
ucharbuf attribbuf
 
static ucharattribdata
 
static attribinfo attribdefs [MAXATTRIBS]
 
static attribinfo lastattribs [MAXATTRIBS]
 
int enabled = 0
 
static int numattribs = 0
 
static int attribmask = 0
 
static int numlastattribs = 0
 
static int lastattribmask = 0
 
static int vertexsize = 0
 
static int lastvertexsize = 0
 
static GLenum primtype = GL_TRIANGLES
 
static ucharlastbuf = nullptr
 
static bool changedattribs = false
 
static vector< GLint > multidrawstart
 
static vector< GLsizei > multidrawcount
 
static GLuint quadindexes = 0
 
static bool quadsenabled = false
 
static GLuint vbo = 0
 
static int vbooffset = MAXVBOSIZE
 
static GLuint defaultvao = 0
 

Enumeration Type Documentation

anonymous enum
Enumerator
ATTRIB_VERTEX 
ATTRIB_COLOR 
ATTRIB_TEXCOORD0 
ATTRIB_TEXCOORD1 
ATTRIB_NORMAL 
ATTRIB_TANGENT 
ATTRIB_BONEWEIGHT 
ATTRIB_BONEINDEX 
MAXATTRIBS 

Function Documentation

template<class T >
static void gle::attrib ( x)
inlinestatic
template<class T >
static void gle::attrib ( x,
y 
)
inlinestatic
template<class T >
static void gle::attrib ( x,
y,
z 
)
inlinestatic
template<class T >
static void gle::attrib ( x,
y,
z,
w 
)
inlinestatic
static void gle::attrib ( const vec v)
inlinestatic
static void gle::attrib ( const vec v,
float  w 
)
inlinestatic
static void gle::attrib ( const vec2 v)
inlinestatic
static void gle::attrib ( const vec4 v)
inlinestatic
static void gle::attrib ( const ivec v)
inlinestatic
static void gle::attrib ( const ivec v,
int  w 
)
inlinestatic
static void gle::attrib ( const ivec2 v)
inlinestatic
static void gle::attrib ( const ivec4 v)
inlinestatic
static void gle::attrib ( const bvec b)
inlinestatic
static void gle::attrib ( const bvec b,
uchar  w 
)
inlinestatic
static void gle::attrib ( const bvec4 b)
inlinestatic
template<size_t N, class T >
static void gle::attribv ( const T *  v)
inlinestatic

References attribbuf, and databuf< T >::put().

void gle::begin ( GLenum  mode)
void gle::begin ( GLenum  mode,
int  numverts 
)
static void gle::bindebo ( GLuint  ebo)
inlinestatic
static void gle::bindvbo ( GLuint  vbo)
inlinestatic
void gle::cleanup ( )
static void gle::clearebo ( )
inlinestatic
static void gle::clearvbo ( )
inlinestatic
static void gle::color ( const bvec v,
uchar  alpha = 255 
)
inlinestatic
static void gle::color ( const bvec4 v)
inlinestatic

References glVertexAttrib4Nubv_.

void gle::defattrib ( int  type,
int  size,
int  format 
)
void gle::defattribs ( const char *  fmt)
static void gle::disable ( )
inlinestatic

References enabled, and forcedisable().

static void gle::disable ( )
inlinestatic
static void gle::disableattrib ( int  index)
inlinestatic
void gle::disablequads ( )
void gle::drawquads ( int  offset,
int  count 
)
static void gle::enableattrib ( int  index)
inlinestatic
void gle::enablequads ( )
int gle::end ( )

References attribbuf, attribdata, drawquads(), databuf< T >::empty(), enablequads(), databuf< T >::getbuf(), GL_MAP_INVALIDATE_RANGE_BIT, GL_MAP_UNSYNCHRONIZED_BIT, GL_MAP_WRITE_BIT, glBindBuffer_, glBufferData_, glBufferSubData_, glGenBuffers_, glMapBufferRange_, glMultiDrawArrays_, glUnmapBuffer_, lastbuf, lastvertexsize, databuf< T >::length(), loopv, MAXQUADS, MAXVBOSIZE, multidraw(), multidrawcount, multidrawstart, primtype, quadsenabled, databuf< T >::reset(), setattribs(), recorder::start(), vbo, vbooffset, and vertexsize.

Referenced by addblendbrush(), blobrenderer::addtris(), at(), bgquad(), boxs(), aviwriter::boxsample(), boxsgrid(), calclight(), decalrenderer::clearfadeddecals(), compilestatements(), compilestr(), complete(), cutstring(), rendertarget::debugblurtiles(), debugline(), rendertarget::debugscissor(), decodeutf8(), editor::draw(), draw_char(), draw_text(), game::captureclientmode::drawblips(), drawdamagecompass(), drawenvboxface(), drawenvoverlay(), game::drawicon(), game::drawminimap(), game::drawradar(), gui::drawskin(), game::drawteammates(), encodeutf8(), endianswap(), escapeid(), explodelist(), blobrenderer::fadeblob(), decalrenderer::fadedecal(), decalrenderer::fadeindecals(), decalrenderer::fadeoutdecals(), skelmodel::skeleton::findskelanim(), forcecubemapload(), generatelightmap(), gengenericvariant(), genpvs(), getbool(), Shader::getvariant(), indexlist(), insertionsort(), listdel(), listfilter(), listfind(), listincludes(), listsplice(), md5::md5mesh::load(), Slot::loadthumbnail(), looplist(), looplistconc(), makerelpath(), maskreflection(), newgui(), optimizeblendmap(), optimizematsurfs(), ipmask::parse(), parsefloat(), parselist(), game::parseplayer(), patchlight(), prettylist(), gui::previewslot(), queryreflection(), gui::rect_(), removelmalpha(), flarerenderer::render(), render2dbox(), renderellipse(), renderentarrow(), renderentattachment(), renderentcone(), renderentring(), renderentselection(), renderlightning(), rendermaterials(), rendermatgrid(), meterrenderer::renderpart(), renderprogress(), rendertexturepanel(), rendertarget::rendertiles(), renderwater(), reorients3tc(), reorienttexture(), varenderer< T >::seedemitter(), seedpos(), skelcommands< MDL >::setanim(), Shader::setvariant_(), sortlist(), sublist(), texagrad(), text_color(), and aviwriter::writesound().

void gle::forcedisable ( )
void gle::multidraw ( )
static void gle::normal ( float  x,
float  y,
float  z 
)
inlinestatic
static void gle::normal ( const vec v)
inlinestatic

References glVertexAttrib4f_.

static void gle::setattrib ( const attribinfo &  a,
uchar buf 
)
inlinestatic
static void gle::setattribs ( uchar buf)
inlinestatic
void gle::setup ( )
static void gle::tangent ( float  x,
float  y,
float  z,
float  w = 1.0f 
)
inlinestatic
static void gle::tangent ( const vec v,
float  w = 1.0f 
)
inlinestatic

References glVertexAttrib4f_.

static void gle::tangent ( const vec4 v)
inlinestatic

References glVertexAttrib4fv_.

static void gle::unsetattrib ( const attribinfo &  a)
inlinestatic

Variable Documentation

ucharbuf gle::attribbuf
uchar* gle::attribdata
static

Referenced by end(), and setup().

attribinfo gle::attribdefs[MAXATTRIBS]
static

Referenced by defattrib(), and setattribs().

int gle::attribmask = 0
static

Referenced by defattrib(), and setattribs().

const char *const gle::attribnames = { "vvertex", "vcolor", "vtexcoord0", "vtexcoord1", "vnormal", "vtangent", "vboneweight", "vboneindex" }

Referenced by linkglslprogram().

bool gle::changedattribs = false
static

Referenced by defattrib(), and setattribs().

GLuint gle::defaultvao = 0
static

Referenced by cleanup(), and setup().

int gle::enabled = 0
int gle::lastattribmask = 0
static

Referenced by forcedisable(), and setattribs().

attribinfo gle::lastattribs[MAXATTRIBS]
static

Referenced by setattribs().

uchar* gle::lastbuf = nullptr
static

Referenced by end(), forcedisable(), and setattribs().

int gle::lastvertexsize = 0
static

Referenced by begin(), end(), forcedisable(), and setattribs().

vector<GLsizei> gle::multidrawcount
static

Referenced by end(), and multidraw().

vector<GLint> gle::multidrawstart
static

Referenced by end(), and multidraw().

int gle::numattribs = 0
static

Referenced by defattrib(), and setattribs().

int gle::numlastattribs = 0
static

Referenced by forcedisable(), and setattribs().

GLenum gle::primtype = GL_TRIANGLES
static

Referenced by begin(), and end().

GLuint gle::quadindexes = 0
static

Referenced by cleanup(), and enablequads().

bool gle::quadsenabled = false
static
GLuint gle::vbo = 0
static
int gle::vbooffset = MAXVBOSIZE
static

Referenced by begin(), cleanup(), and end().

int gle::vertexsize = 0
static