Fix FBO_*() usage when framebuffers are unavailable or undesired.

This commit is contained in:
James Canete 2012-10-28 20:22:13 +00:00
parent c4aa3cf8c0
commit 5cbe7888f8
7 changed files with 43 additions and 36 deletions

View file

@ -476,13 +476,13 @@ void RE_RenderScene( const refdef_t *fd ) {
}
/* playing with more shadows */
if(!( fd->rdflags & RDF_NOWORLDMODEL ) && r_shadows->integer == 4)
if(glRefConfig.framebufferObject && !( fd->rdflags & RDF_NOWORLDMODEL ) && r_shadows->integer == 4)
{
R_RenderPshadowMaps(fd);
}
// playing with even more shadows
if(!( fd->rdflags & RDF_NOWORLDMODEL ) && (r_forceSun->integer || tr.sunShadows))
if(glRefConfig.framebufferObject && !( fd->rdflags & RDF_NOWORLDMODEL ) && (r_forceSun->integer || tr.sunShadows))
{
R_RenderSunShadowMaps(fd, 0);
R_RenderSunShadowMaps(fd, 1);