#5979: Cubemap support for opengl2.

This commit is contained in:
SmileTheory 2013-09-16 00:54:26 -07:00
parent 68a616c7f1
commit 7e875c6941
23 changed files with 1268 additions and 516 deletions

View file

@ -288,6 +288,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
@ -344,6 +345,8 @@ void R_AddMD3Surfaces( trRefEntity_t *ent ) {
//
fogNum = R_ComputeFogNum( model, ent );
cubemapIndex = R_CubemapForPoint(ent->e.origin);
//
// draw all surfaces
//
@ -387,7 +390,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++;