64 vec4_t color = {1.0, 1.0, 1.0, 1.0};
100 int numSurfaces = surfs->
count;
104 int lastLightMap = 0, lastDeluxeMap = 0;
105 image_t* lastTexture =
nullptr;
106 uint32_t lastFlags = ~0;
108 int batchStart = 0, batchSize = 0;
110 while (numSurfaces--) {
115 bool newBatch =
false;
117 if (surf->
frame != frame)
119 if (numTriangles <= 0)
146 lastTexture = texInfo->
image;
149 lastFlags = texFlags;
153 batchSize += numTriangles;
void R_EnableBumpmap(const image_t *normalmap)
Enables bumpmapping and binds the given normalmap.
void R_BindLightmapTexture(GLuint texnum)
surfaces are assigned to arrays based on their primary rendering type and then sorted by world textur...
unsigned int numTriangles
static void R_SetSurfaceState(const mBspSurface_t *surf)
Set the surface state according to surface flags and bind the texture.
local graphics definitions
void R_SetSurfaceBumpMappingParameters(const mBspSurface_t *surf, const image_t *normalMap, const image_t *specularMap)
void R_BindDeluxemapTexture(GLuint texnum)
void R_Color(const vec4_t rgba)
Change the color to given value.
#define GL_ELEMENT_INDEX_TYPE
mBspSurface_t ** surfaces
struct image_s * specularmap
void R_UseMaterial(const material_t *material)
struct image_s * normalmap
void R_DrawSurfaces(const mBspSurfaces_t *surfs, glElementIndex_t *indexPtr)
General surface drawing function, that draw the surface chains.
void R_EnableSpecularMap(const image_t *image, bool enable)
#define R_BindTexture(tn)
const struct image_s * active_normalmap
void R_EnableGlowMap(const image_t *image)