|
UFO: Alien Invasion
|
Arrays are "lazily" managed to reduce glArrayPointer calls. Drawing routines should call R_SetArrayState or R_ResetArrayState somewhat early-on. More...
#include "r_local.h"
Go to the source code of this file.
Data Structures | |
| struct | r_array_state_t |
Macros | |
| #define | R_ARRAY_VERTEX 0x1 |
| #define | R_ARRAY_COLOR 0x2 |
| #define | R_ARRAY_NORMAL 0x4 |
| #define | R_ARRAY_TANGENT 0x8 |
| #define | R_ARRAY_TEX_DIFFUSE 0x10 |
| #define | R_ARRAY_TEX_LIGHTMAP 0x20 |
| #define | R_ARRAY_ELEMENT 0x1000 |
Functions | |
| static int | R_ArraysMask (void) |
| This function is consulted to determine whether or not array bindings are up to date. | |
| static void | R_SetVertexArrayState (const mBspModel_t *bsp, int mask) |
| static void | R_SetVertexBufferState (const mBspModel_t *bsp, int mask) |
| void | R_SetArrayState (const mBspModel_t *bsp) |
| void | R_ResetArrayState (void) |
Variables | |
| static r_array_state_t | r_array_state |
Arrays are "lazily" managed to reduce glArrayPointer calls. Drawing routines should call R_SetArrayState or R_ResetArrayState somewhat early-on.
Definition in file r_array.cpp.
| #define R_ARRAY_COLOR 0x2 |
Definition at line 31 of file r_array.cpp.
Referenced by R_ArraysMask().
| #define R_ARRAY_ELEMENT 0x1000 |
Definition at line 36 of file r_array.cpp.
Referenced by R_ArraysMask(), and R_SetVertexBufferState().
| #define R_ARRAY_NORMAL 0x4 |
Definition at line 32 of file r_array.cpp.
Referenced by R_ArraysMask(), R_SetVertexArrayState(), and R_SetVertexBufferState().
| #define R_ARRAY_TANGENT 0x8 |
Definition at line 33 of file r_array.cpp.
Referenced by R_ArraysMask(), R_SetVertexArrayState(), and R_SetVertexBufferState().
| #define R_ARRAY_TEX_DIFFUSE 0x10 |
Definition at line 34 of file r_array.cpp.
Referenced by R_ArraysMask(), R_SetVertexArrayState(), and R_SetVertexBufferState().
| #define R_ARRAY_TEX_LIGHTMAP 0x20 |
Definition at line 35 of file r_array.cpp.
Referenced by R_ArraysMask(), R_SetVertexArrayState(), and R_SetVertexBufferState().
| #define R_ARRAY_VERTEX 0x1 |
Definition at line 30 of file r_array.cpp.
Referenced by R_ArraysMask(), R_SetVertexArrayState(), and R_SetVertexBufferState().
This function is consulted to determine whether or not array bindings are up to date.
Definition at line 52 of file r_array.cpp.
References R_ARRAY_COLOR, R_ARRAY_ELEMENT, R_ARRAY_NORMAL, R_ARRAY_TANGENT, R_ARRAY_TEX_DIFFUSE, R_ARRAY_TEX_LIGHTMAP, R_ARRAY_VERTEX, r_bumpmap, r_state, texunit_diffuse, and texunit_lightmap.
Referenced by R_SetArrayState().
Definition at line 185 of file r_array.cpp.
References GL_TANGENT_ARRAY, r_array_state, R_BindBuffer(), R_BindDefaultArray(), R_SelectTexture(), r_state, r_vertexbuffers, texunit_diffuse, and texunit_lightmap.
Referenced by R_DrawAliasModelBuffer(), R_DrawBspNormals(), R_DrawCoronas(), R_DrawFlareSurfaces(), R_DrawMaterialSurfaces(), R_ReinitOpenglContext(), R_RenderBspRRefs(), R_RenderFrame(), and Weather::render().
| void R_SetArrayState | ( | const mBspModel_t * | bsp | ) |
Definition at line 153 of file r_array.cpp.
References r_array_state, R_ArraysMask(), R_SetVertexArrayState(), R_SetVertexBufferState(), and r_vertexbuffers.
Referenced by R_RenderBspRRefs().
|
inlinestatic |
| [in] | bsp | The BSP model to use arrays from |
| [in] | mask | The bitmask representing the arrays which should be enabled according to r_state. |
Definition at line 82 of file r_array.cpp.
References GL_TANGENT_ARRAY, mBspModel_t::lmtexcoords, mBspModel_t::normals, R_ARRAY_NORMAL, R_ARRAY_TANGENT, R_ARRAY_TEX_DIFFUSE, R_ARRAY_TEX_LIGHTMAP, R_ARRAY_VERTEX, R_BindArray(), R_SelectTexture(), r_state, mBspModel_t::tangents, mBspModel_t::texcoords, texunit_diffuse, texunit_lightmap, and mBspModel_t::verts.
Referenced by R_SetArrayState().
|
inlinestatic |
| [in] | bsp | The BSP model to use arrays from |
| [in] | mask | The bitmask representing the arrays which should be enabled according to r_state. |
Definition at line 118 of file r_array.cpp.
References GL_TANGENT_ARRAY, mBspModel_t::index_buffer, mBspModel_t::lmtexcoord_buffer, mBspModel_t::normal_buffer, R_ARRAY_ELEMENT, R_ARRAY_NORMAL, R_ARRAY_TANGENT, R_ARRAY_TEX_DIFFUSE, R_ARRAY_TEX_LIGHTMAP, R_ARRAY_VERTEX, R_BindBuffer(), R_SelectTexture(), r_state, mBspModel_t::tangent_buffer, mBspModel_t::texcoord_buffer, texunit_diffuse, texunit_lightmap, and mBspModel_t::vertex_buffer.
Referenced by R_SetArrayState().
|
static |
Definition at line 43 of file r_array.cpp.
Referenced by R_ResetArrayState(), and R_SetArrayState().