Example #1
0
/*
* R_DrawSkyBoxSide
*/
static void R_DrawSkyBoxSide( const skydome_t *skydome, const visSkySide_t *visSide, const shader_t *skyShader,
							  const shader_t *skyboxShader, const mfog_t *fog, int imageIndex, drawSurfaceSky_t *drawSurf ) {
	int side = visSide->index;

	if( drawSurf->skyMins[0][side] >= drawSurf->skyMaxs[0][side] ||
		drawSurf->skyMins[1][side] >= drawSurf->skyMaxs[1][side] ) {
		return;
	}

	RB_BindShader( rsc.skyent, skyShader, fog );

	RB_BindVBO( skydome->linearVbos[side]->index, GL_TRIANGLES );

	RB_SetSkyboxShader( skyboxShader );

	RB_SetSkyboxSide( imageIndex );

	RB_DrawElements( visSide->firstVert, visSide->numVerts, visSide->firstElem, visSide->numElems, 0, 0, 0, 0 );
}
Example #2
0
/*
* R_DrawSkyBoxSide
*/
static void R_DrawSkyBoxSide( const skydome_t *skydome, const visSkySide_t *visSide, const shader_t *shader, 
	int imageIndex )
{
	int side = visSide->index;

	if( rn.skyMins[0][side] >= rn.skyMaxs[0][side] ||
		rn.skyMins[1][side] >= rn.skyMaxs[1][side] )
		return;

	RB_BindShader( rsc.worldent, rf.skyShader, rn.skyFog );

	RB_BindVBO( skydome->linearVbos[side]->index, GL_TRIANGLES );

	RB_SetSkyboxShader( shader );

	RB_SetSkyboxSide( imageIndex );

	RB_DrawElements( visSide->firstVert, visSide->numVerts, visSide->firstElem, visSide->numElems );
}