30#define R_ARRAY_VERTEX 0x1
31#define R_ARRAY_COLOR 0x2
32#define R_ARRAY_NORMAL 0x4
33#define R_ARRAY_TANGENT 0x8
34#define R_ARRAY_TEX_DIFFUSE 0x10
35#define R_ARRAY_TEX_LIGHTMAP 0x20
36#define R_ARRAY_ELEMENT 0x1000
38typedef struct r_array_state_s {
58 if (
r_state.color_array_enabled)
129 if (
r_state.lighting_enabled) {
173 mask = arrays & xorR;
193 qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
199 if (
r_state.color_array_enabled)
203 if (
r_state.lighting_enabled) {
static int R_ArraysMask(void)
This function is consulted to determine whether or not array bindings are up to date.
#define R_ARRAY_TEX_DIFFUSE
void R_SetArrayState(const mBspModel_t *bsp)
static void R_SetVertexArrayState(const mBspModel_t *bsp, int mask)
void R_ResetArrayState(void)
static r_array_state_t r_array_state
static void R_SetVertexBufferState(const mBspModel_t *bsp, int mask)
#define R_ARRAY_TEX_LIGHTMAP
local graphics definitions
void R_BindBuffer(GLenum target, GLenum type, GLuint id)
void R_BindDefaultArray(GLenum target)
Binds the appropriate shared vertex array to the specified target.
bool R_SelectTexture(gltexunit_t *texunit)
Returns false if the texunit is not supported.
void R_BindArray(GLenum target, GLenum type, const void *array)
unsigned int tangent_buffer
unsigned int normal_buffer
unsigned int index_buffer
unsigned int vertex_buffer
unsigned int texcoord_buffer
unsigned int lmtexcoord_buffer
const mBspModel_t * bspmodel