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
159 r_array_state.
arrays = 0xFFFF;
167 if (r_array_state.
bspmodel == bsp) {
168 const int xorR = r_array_state.
arrays ^ arrays;
173 mask = arrays & xorR;
182 r_array_state.
arrays = arrays;
193 qglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
static void R_SetVertexBufferState(const mBspModel_t *bsp, int mask)
const mBspModel_t * bspmodel
unsigned int texcoord_buffer
void R_BindBuffer(GLenum target, GLenum type, GLuint id)
#define R_ARRAY_TEX_LIGHTMAP
local graphics definitions
#define R_ARRAY_TEX_DIFFUSE
static r_array_state_t r_array_state
unsigned int normal_buffer
unsigned int tangent_buffer
void R_ResetArrayState(void)
struct r_array_state_s r_array_state_t
void R_BindDefaultArray(GLenum target)
Binds the appropriate shared vertex array to the specified target.
unsigned int vertex_buffer
unsigned int lmtexcoord_buffer
void R_SetArrayState(const mBspModel_t *bsp)
static void R_SetVertexArrayState(const mBspModel_t *bsp, int mask)
unsigned int index_buffer
bool R_SelectTexture(gltexunit_t *texunit)
Returns false if the texunit is not supported.
void R_BindArray(GLenum target, GLenum type, const void *array)
static int R_ArraysMask(void)
This function is consulted to determine whether or not array bindings are up to date.