- else
- {
- // opaque lightmapped
- if (r_textureunits.integer >= 2)
- {
- if (r_textureunits.integer >= 3 && gl_combine.integer && r_detailtextures.integer)
- RSurfShader_OpaqueWall_Pass_BaseTripleTexCombine(ent, texture, firstsurf);
- else
- {
- RSurfShader_OpaqueWall_Pass_BaseDoubleTex(ent, texture, firstsurf);
- if (r_detailtextures.integer)
- RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, firstsurf);
- }
- }
- else
- {
- RSurfShader_OpaqueWall_Pass_BaseTexture(ent, texture, firstsurf);
- RSurfShader_OpaqueWall_Pass_BaseLightmap(ent, texture, firstsurf);
- if (r_detailtextures.integer)
- RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, firstsurf);
- }
- if (!r_dlightmap.integer && !(ent->effects & EF_FULLBRIGHT))
- RSurfShader_OpaqueWall_Pass_Light(ent, texture, firstsurf);
- if (texture->glowtexture)
- RSurfShader_OpaqueWall_Pass_Glow(ent, texture, firstsurf);
- if (fogenabled)
- RSurfShader_OpaqueWall_Pass_Fog(ent, texture, firstsurf);
- }
-}
-
-static void RSurfShader_Wall_Lightmap_BaseLighting(const entity_render_t *ent, const texture_t *texture, const msurface_t *firstsurf)
-{
- const msurface_t *surf;
- if (cl.worldmodel->numlights)
- RSurfShader_OpaqueWall_Pass_OpaqueGlow(ent, texture, firstsurf);