FTEQW
Documentation of the FTE engine source tree.
gl_backend.c File Reference

Typedefs

typedef vec3_t mat3_t[3]
 

Functions

void DumpGLState (void)
 
void GLBE_SubmitBatch (batch_t *batch)
 
void GLBE_PolyOffsetStencilShadow (qboolean pushdepth)(void)
 
void GL_TexEnv (GLenum mode)
 
void GL_ForceDepthWritable (void)
 
void GL_SetShaderState2D (qboolean is2d)
 
void GL_SelectTexture (int target)
 
void GL_SelectVBO (int vbo)
 
void GL_DeselectVAO (void)
 
void GL_SelectEBO (int vbo)
 
void GL_MTBind (int tmu, int target, texid_t texnum)
 
void GLBE_SetupVAO (vbo_t *vbo, unsigned int vaodynamic, unsigned int vaostatic)
 
void GL_SelectProgram (int program)
 
void GLBE_RenderShadowBuffer (unsigned int numverts, int vbo, vecV_t *verts, unsigned numindicies, int ibo, index_t *indicies)
 
void GL_CullFace (unsigned int sflags)
 
void GLBE_SetupForShadowMap (dlight_t *dl, int texwidth, int texheight, float shadowscale)
 
int GLBE_BeginRenderBuffer_DepthOnly (texid_t depthtexture)
 
qboolean GLBE_BeginShadowMap (int id, int w, int h, uploadfmt_t encoding, int *restorefbo)
 
void GLBE_EndShadowMap (int restorefbo)
 
void Shader_LightPass (struct shaderparsestate_s *ps, const char *shortname, const void *args)
 
void GenerateFogTexture (texid_t *tex, float density, float zscale)
 
void GLBE_DestroyFBOs (void)
 
void GLBE_Shutdown (void)
 
void GLBE_Init (void)
 
qboolean GLBE_LightCullModel (vec3_t org, model_t *model)
 
void GLBE_SelectMode (backendmode_t mode)
 
void GLBE_SelectEntity (entity_t *ent)
 
qboolean GLBE_SelectDLight (dlight_t *dl, vec3_t colour, vec3_t axis[3], unsigned int lmode)
 
void GLBE_Scissor (srect_t *rect)
 
texid_t GenerateNormalisationCubeMap (void)
 
void GLBE_DrawMesh_List (shader_t *shader, int nummeshes, mesh_t **meshlist, vbo_t *vbo, texnums_t *texnums, unsigned int beflags)
 
void GLBE_DrawMesh_Single (shader_t *shader, mesh_t *mesh, vbo_t *vbo, unsigned int beflags)
 
void GLBE_SubmitMeshes (batch_t **worldbatches, int start, int stop)
 
void GLBE_UpdateLightmaps (void)
 
batch_tGLBE_GetTempBatch (void)
 
void GLBE_BaseEntTextures (const qbyte *worldpvs, const int *worldareas)
 
void GLBE_RenderToTextureUpdate2d (qboolean destchanged)
 
void GLBE_FBO_Sources (texid_t sourcecolour, texid_t sourcedepth)
 
int GLBE_FBO_Push (fbostate_t *state)
 
void GLBE_FBO_Pop (int oldfbo)
 
void GLBE_FBO_Destroy (fbostate_t *state)
 
int GLBE_FBO_Update (fbostate_t *state, unsigned int enables, texid_t *destcol, int mrt, texid_t destdepth, int width, int height, int layer)
 
void GLBE_DrawLightPrePass (void)
 
qboolean R_DrawSkyroom (shader_t *skyshader)
 
void GLBE_DrawWorld (batch_t **worldbatches)
 
void GLBE_VBO_Begin (vbobctx_t *ctx, size_t maxsize)
 
void GLBE_VBO_Data (vbobctx_t *ctx, void *data, size_t size, vboarray_t *varray)
 
void GLBE_VBO_Finish (vbobctx_t *ctx, void *edata, size_t esize, vboarray_t *earray, void **vbomem, void **ebomem)
 
void GLBE_VBO_Destroy (vboarray_t *vearray, void *vbomem)
 

Variables

cvar_t gl_overbright
 
cvar_t r_tessellation
 
cvar_t r_wireframe
 
cvar_t r_outline
 
cvar_t r_outline_width
 
cvar_t r_refract_fbo
 
texid_t missing_texture
 
texid_t missing_texture_gloss
 
texid_t missing_texture_normal
 
texid_t scenepp_postproc_cube
 
texid_t r_whiteimage
 
cvar_t r_glsl_offsetmapping
 
cvar_t r_portalrecursion
 
cvar_t r_portalonly
 
double r_loaderstalltime
 

Typedef Documentation

◆ mat3_t

typedef vec3_t mat3_t[3]

Function Documentation

◆ DumpGLState()

void DumpGLState ( void  )

◆ GenerateFogTexture()

void GenerateFogTexture ( texid_t tex,
float  density,
float  zscale 
)

◆ GenerateNormalisationCubeMap()

texid_t GenerateNormalisationCubeMap ( void  )

◆ GL_CullFace()

void GL_CullFace ( unsigned int  sflags)

◆ GL_DeselectVAO()

void GL_DeselectVAO ( void  )

◆ GL_ForceDepthWritable()

void GL_ForceDepthWritable ( void  )

◆ GL_MTBind()

void GL_MTBind ( int  tmu,
int  target,
texid_t  texnum 
)

◆ GL_SelectEBO()

void GL_SelectEBO ( int  vbo)

◆ GL_SelectProgram()

void GL_SelectProgram ( int  program)

◆ GL_SelectTexture()

void GL_SelectTexture ( int  target)

◆ GL_SelectVBO()

void GL_SelectVBO ( int  vbo)

◆ GL_SetShaderState2D()

void GL_SetShaderState2D ( qboolean  is2d)

◆ GL_TexEnv()

void GL_TexEnv ( GLenum  mode)

◆ GLBE_BaseEntTextures()

void GLBE_BaseEntTextures ( const qbyte worldpvs,
const int worldareas 
)

◆ GLBE_BeginRenderBuffer_DepthOnly()

int GLBE_BeginRenderBuffer_DepthOnly ( texid_t  depthtexture)

◆ GLBE_BeginShadowMap()

qboolean GLBE_BeginShadowMap ( int  id,
int  w,
int  h,
uploadfmt_t  encoding,
int restorefbo 
)

◆ GLBE_DestroyFBOs()

void GLBE_DestroyFBOs ( void  )

◆ GLBE_DrawLightPrePass()

void GLBE_DrawLightPrePass ( void  )

◆ GLBE_DrawMesh_List()

void GLBE_DrawMesh_List ( shader_t shader,
int  nummeshes,
mesh_t **  meshlist,
vbo_t vbo,
texnums_t texnums,
unsigned int  beflags 
)

◆ GLBE_DrawMesh_Single()

void GLBE_DrawMesh_Single ( shader_t shader,
mesh_t mesh,
vbo_t vbo,
unsigned int  beflags 
)

◆ GLBE_DrawWorld()

void GLBE_DrawWorld ( batch_t **  worldbatches)

◆ GLBE_EndShadowMap()

void GLBE_EndShadowMap ( int  restorefbo)

◆ GLBE_FBO_Destroy()

void GLBE_FBO_Destroy ( fbostate_t state)

◆ GLBE_FBO_Pop()

void GLBE_FBO_Pop ( int  oldfbo)

◆ GLBE_FBO_Push()

int GLBE_FBO_Push ( fbostate_t state)

◆ GLBE_FBO_Sources()

void GLBE_FBO_Sources ( texid_t  sourcecolour,
texid_t  sourcedepth 
)

◆ GLBE_FBO_Update()

int GLBE_FBO_Update ( fbostate_t state,
unsigned int  enables,
texid_t destcol,
int  mrt,
texid_t  destdepth,
int  width,
int  height,
int  layer 
)

◆ GLBE_GetTempBatch()

batch_t * GLBE_GetTempBatch ( void  )

◆ GLBE_Init()

void GLBE_Init ( void  )

◆ GLBE_LightCullModel()

qboolean GLBE_LightCullModel ( vec3_t  org,
model_t model 
)

◆ GLBE_PolyOffsetStencilShadow()

void GLBE_PolyOffsetStencilShadow ( qboolean  pushdepth)

◆ GLBE_RenderShadowBuffer()

void GLBE_RenderShadowBuffer ( unsigned int  numverts,
int  vbo,
vecV_t *  verts,
unsigned  numindicies,
int  ibo,
index_t indicies 
)

◆ GLBE_RenderToTextureUpdate2d()

void GLBE_RenderToTextureUpdate2d ( qboolean  destchanged)

◆ GLBE_Scissor()

void GLBE_Scissor ( srect_t rect)

◆ GLBE_SelectDLight()

qboolean GLBE_SelectDLight ( dlight_t dl,
vec3_t  colour,
vec3_t  axis[3],
unsigned int  lmode 
)

◆ GLBE_SelectEntity()

void GLBE_SelectEntity ( entity_t ent)

◆ GLBE_SelectMode()

void GLBE_SelectMode ( backendmode_t  mode)

◆ GLBE_SetupForShadowMap()

void GLBE_SetupForShadowMap ( dlight_t dl,
int  texwidth,
int  texheight,
float  shadowscale 
)

◆ GLBE_SetupVAO()

void GLBE_SetupVAO ( vbo_t vbo,
unsigned int  vaodynamic,
unsigned int  vaostatic 
)

◆ GLBE_Shutdown()

void GLBE_Shutdown ( void  )

◆ GLBE_SubmitBatch()

void GLBE_SubmitBatch ( batch_t batch)

◆ GLBE_SubmitMeshes()

void GLBE_SubmitMeshes ( batch_t **  worldbatches,
int  start,
int  stop 
)

◆ GLBE_UpdateLightmaps()

void GLBE_UpdateLightmaps ( void  )

◆ GLBE_VBO_Begin()

void GLBE_VBO_Begin ( vbobctx_t ctx,
size_t  maxsize 
)

◆ GLBE_VBO_Data()

void GLBE_VBO_Data ( vbobctx_t ctx,
void data,
size_t  size,
vboarray_t varray 
)

◆ GLBE_VBO_Destroy()

void GLBE_VBO_Destroy ( vboarray_t vearray,
void vbomem 
)

◆ GLBE_VBO_Finish()

void GLBE_VBO_Finish ( vbobctx_t ctx,
void edata,
size_t  esize,
vboarray_t earray,
void **  vbomem,
void **  ebomem 
)

◆ R_DrawSkyroom()

qboolean R_DrawSkyroom ( shader_t skyshader)

◆ Shader_LightPass()

void Shader_LightPass ( struct shaderparsestate_s *  ps,
const char *  shortname,
const void args 
)

Variable Documentation

◆ allblack_mvp

int allblack_mvp

◆ allblackshader

union programhandle_u allblackshader

◆ blendmode

int blendmode[SHADER_TMU_MAX]

◆ colourarraytype

int colourarraytype

◆ crepopaqueshader

const shader_t* crepopaqueshader

◆ crepskyshader

const shader_t* crepskyshader

◆ curbatch

const batch_t* curbatch

◆ curcolourpointer

void* curcolourpointer

◆ curcolourvbo

int curcolourvbo

◆ curcull

unsigned int curcull

◆ curdlight

const dlight_t* curdlight

◆ curentity

const entity_t* curentity

◆ curpatchverts

int curpatchverts

◆ curpolyoffset

polyoffset_t curpolyoffset

◆ currentebo

int currentebo

◆ currentprogram

int currentprogram

◆ currenttextures

int currenttextures[SHADER_TMU_MAX]

◆ currenttmu

int currenttmu

◆ currentvao

int currentvao

◆ currentvbo

int currentvbo

◆ curshader

const material_t* curshader

◆ curshadowmap

texid_t curshadowmap

◆ curtexnums

const texnums_t* curtexnums

◆ curtexturetype

GLenum curtexturetype[SHADER_TMU_MAX]

◆ curtime

float curtime

◆ curvertexpointer

void* curvertexpointer

◆ curvertexvbo

int curvertexvbo

◆ depthonlyshader

const shader_t* depthonlyshader

◆ dummybatch

batch_t dummybatch

◆ dummyvbo

vbo_t dummyvbo

◆ fbo_2dfbo

fbostate_t fbo_2dfbo

◆ fbo_current

int fbo_current

◆ fbo_lprepass

fbostate_t fbo_lprepass

◆ fbo_reflectrefrac

fbostate_t fbo_reflectrefrac[R_MAX_RECURSE]

◆ flags

unsigned int flags

◆ fog

const mfog_t* fog

◆ fogfar

float fogfar

◆ fogtexture

texid_t fogtexture

◆ force2d

qboolean force2d

◆ gl_overbright

cvar_t gl_overbright
extern

◆ identitylighting

float identitylighting

◆ identitylightmap

float identitylightmap

◆ inited_shader_light

qboolean inited_shader_light[1u<< LSHADER_MODES]

◆ lastpasstmus

int lastpasstmus

◆ lastuniform

int lastuniform

◆ lightcolours

vec3_t lightcolours

◆ lightcolourscale

vec3_t lightcolourscale

◆ lightcubemap

texid_t lightcubemap

◆ lightdir

vec3_t lightdir

◆ lightmode

int lightmode

◆ lightorg

vec3_t lightorg

◆ lightprojmatrix

float lightprojmatrix[16]

◆ lightradius

float lightradius

◆ lightshadowmapinfo

vec4_t lightshadowmapinfo

◆ lightshadowmapproj

vec4_t lightshadowmapproj

◆ lightshadowmapscale

vec2_t lightshadowmapscale

◆ lighttexture

texid_t lighttexture

◆ maxwbatches

int maxwbatches

◆ mbatches

batch_t** mbatches

◆ meshcount

unsigned int meshcount

◆ meshes

mesh_t** meshes

◆ missing_texture

texid_t missing_texture
extern

◆ missing_texture_gloss

texid_t missing_texture_gloss
extern

◆ missing_texture_normal

texid_t missing_texture_normal
extern

◆ mode

◆ modelmatrix

float modelmatrix[16]

◆ modelmatrixinv

float modelmatrixinv[16]

◆ modelviewmatrix

float modelviewmatrix[16]

◆ normalisationcubemap

texid_t normalisationcubemap

◆ oldheight

int oldheight

◆ oldwidth

int oldwidth

◆ pendingcolourflat

vec4_t pendingcolourflat

◆ pendingcolourpointer

void* pendingcolourpointer

◆ pendingcolourvbo

int pendingcolourvbo

◆ pendingtexcoordparts

int pendingtexcoordparts[SHADER_TMU_MAX]

◆ pendingtexcoordpointer

void* pendingtexcoordpointer[SHADER_TMU_MAX]

◆ pendingtexcoordvbo

int pendingtexcoordvbo[SHADER_TMU_MAX]

◆ pendingvertexpointer

void* pendingvertexpointer

◆ pendingvertexvbo

int pendingvertexvbo

◆ polyoffset

polyoffset_t polyoffset

◆ programfixedemu

program_t* programfixedemu[8]

◆ projectionmatrix

float projectionmatrix[16]

◆ r_glsl_offsetmapping

cvar_t r_glsl_offsetmapping
extern

◆ r_loaderstalltime

double r_loaderstalltime
extern

◆ r_outline

cvar_t r_outline
extern

◆ r_outline_width

cvar_t r_outline_width
extern

◆ r_portalonly

cvar_t r_portalonly

◆ r_portalrecursion

cvar_t r_portalrecursion

◆ r_refract_fbo

cvar_t r_refract_fbo
extern

◆ r_tessellation

cvar_t r_tessellation
extern

◆ r_whiteimage

texid_t r_whiteimage
extern

◆ r_wireframe

cvar_t r_wireframe
extern

◆ scenepp_postproc_cube

texid_t scenepp_postproc_cube
extern

◆ sha_attr

unsigned int sha_attr

◆ shader_light

const shader_t* shader_light[1u<< LSHADER_MODES]

◆ shaderbits

unsigned int shaderbits

◆ sourcevbo

vbo_t* sourcevbo

◆ streamebo

int streamebo[64]

◆ streamid

int streamid

◆ streamvao

int streamvao[64]

◆ streamvbo

int streamvbo[64]

◆ temptexture

texid_t temptexture

◆ tex_gbuf

texid_t tex_gbuf[GBUFFER_COUNT]

◆ tex_reflectcube

texid_t tex_reflectcube

◆ tex_reflection

texid_t tex_reflection[R_MAX_RECURSE]

◆ tex_refraction

texid_t tex_refraction[R_MAX_RECURSE]

◆ tex_refractiondepth

texid_t tex_refractiondepth[R_MAX_RECURSE]

◆ tex_ripplemap

texid_t tex_ripplemap[R_MAX_RECURSE]

◆ tex_sourcecol

texid_t tex_sourcecol

◆ tex_sourcedepth

texid_t tex_sourcedepth

◆ texenvmode

int texenvmode[SHADER_TMU_MAX]

◆ updatetime

float updatetime

◆ usingweaponviewmatrix

int usingweaponviewmatrix

◆ wbatch

int wbatch

◆ wbatches

batch_t* wbatches

◆ wireframeshader

const shader_t* wireframeshader