summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_mesh.c')
-rw-r--r--src/renderergl2/tr_mesh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/renderergl2/tr_mesh.c b/src/renderergl2/tr_mesh.c
index d1adba2c..72078b75 100644
--- a/src/renderergl2/tr_mesh.c
+++ b/src/renderergl2/tr_mesh.c
@@ -289,6 +289,7 @@ void R_AddMD3Surfaces( trRefEntity_t *ent ) {
int cull;
int lod;
int fogNum;
+ int cubemapIndex;
qboolean personalModel;
// don't add third_person objects if not in a portal
@@ -345,6 +346,8 @@ void R_AddMD3Surfaces( trRefEntity_t *ent ) {
//
fogNum = R_ComputeFogNum( model, ent );
+ cubemapIndex = R_CubemapForPoint(ent->e.origin);
+
//
// draw all surfaces
//
@@ -388,7 +391,7 @@ void R_AddMD3Surfaces( trRefEntity_t *ent ) {
{
srfVBOMDVMesh_t *vboSurface = &model->vboSurfaces[i];
- R_AddDrawSurf((void *)vboSurface, shader, fogNum, qfalse, qfalse );
+ R_AddDrawSurf((void *)vboSurface, shader, fogNum, qfalse, qfalse, cubemapIndex );
}
surface++;