goat3dgfx
changeset 31:3ba80928b530
fixed the build
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 02 Mar 2014 04:20:00 +0200 |
parents | 07c08d970cb4 |
children | 7f0aed0fe289 253542d715f4 |
files | src/rtarg.cc src/scene.h src/shader.cc |
diffstat | 3 files changed, 7 insertions(+), 3 deletions(-) [+] |
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);
2.1 --- a/src/scene.h Sun Mar 02 03:56:47 2014 +0200 2.2 +++ b/src/scene.h Sun Mar 02 04:20:00 2014 +0200 2.3 @@ -3,6 +3,8 @@ 2.4 2.5 #include <vector> 2.6 #include "object.h" 2.7 +#include "light.h" 2.8 +#include "camera.h" 2.9 #include "curve.h" 2.10 2.11 namespace goatgfx {
3.1 --- a/src/shader.cc Sun Mar 02 03:56:47 2014 +0200 3.2 +++ b/src/shader.cc Sun Mar 02 04:20:00 2014 +0200 3.3 @@ -4,6 +4,7 @@ 3.4 #include <errno.h> 3.5 #include "opengl.h" 3.6 #include "shader.h" 3.7 +#include "mesh.h" 3.8 #include "logger.h" 3.9 #include "unistate.h" 3.10 3.11 @@ -21,6 +22,7 @@ 3.12 #endif 3.13 3.14 static std::string read_source(const char *fname); 3.15 +static void bind_standard_attr(const ShaderProg *prog); 3.16 3.17 ShaderProg *ShaderProg::current; 3.18