goat3dgfx
diff src/rtarg.cc @ 31:3ba80928b530
fixed the build
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 02 Mar 2014 04:20:00 +0200 |
parents | dc5918c62a64 |
children |
line diff
1.1 --- a/src/rtarg.cc Sun Mar 02 03:56:47 2014 +0200 1.2 +++ b/src/rtarg.cc Sun Mar 02 04:20:00 2014 +0200 1.3 @@ -41,7 +41,7 @@ 1.4 1.5 CHECKGLERR; 1.6 color_tex = new Texture; 1.7 - color_tex->create(tex_width, tex_height, fmt); 1.8 + color_tex->create(tex_width, tex_height, TEX_2D, fmt); 1.9 CHECKGLERR; 1.10 tex_face = 0; 1.11 1.12 @@ -69,7 +69,7 @@ 1.13 tex->get_size(1), face); 1.14 1.15 tex_targ = GL_TEXTURE_2D; 1.16 - if(dynamic_cast<TextureCube*>(tex)) { 1.17 + if(tex->get_type() == TEX_CUBE) { 1.18 if(face >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && face <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) { 1.19 tex_targ = face; 1.20 } else if(face >= 0 && face < 6) { 1.21 @@ -134,7 +134,7 @@ 1.22 1.23 glBindFramebuffer(GL_FRAMEBUFFER, fbo); 1.24 1.25 - color_tex->create(tex_width, tex_height, color_tex->get_format()); 1.26 + color_tex->create(tex_width, tex_height, TEX_2D, color_tex->get_format()); 1.27 color_tex->bind(); 1.28 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex_targ, color_tex->get_id(), 0); 1.29 glBindTexture(tex_targ, 0);