dungeon_crawler
diff prototype/src/material.cc @ 41:acfe0c0110fc
- cleaned up the renderer
- implemented fallback (non-deferred renderer)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 30 Aug 2012 05:35:00 +0300 |
parents | d0e93b4d9ec9 |
children | aa9e28670ae2 |
line diff
1.1 --- a/prototype/src/material.cc Thu Aug 30 03:05:04 2012 +0300 1.2 +++ b/prototype/src/material.cc Thu Aug 30 05:35:00 2012 +0300 1.3 @@ -3,6 +3,7 @@ 1.4 #include <assimp/material.h> 1.5 #include "opengl.h" 1.6 #include "material.h" 1.7 +#include "renderer.h" 1.8 1.9 extern bool ass_obj_hack; 1.10 1.11 @@ -74,7 +75,7 @@ 1.12 glDisable(GL_TEXTURE_2D); 1.13 } 1.14 1.15 - if(tex[TEXTYPE_NORMAL]) { 1.16 + if(rend->get_current_program() && tex[TEXTYPE_NORMAL]) { 1.17 glActiveTextureARB(GL_TEXTURE1); 1.18 glBindTexture(GL_TEXTURE_2D, tex[TEXTYPE_NORMAL]); 1.19 glEnable(GL_TEXTURE_2D);