Framebuffer - get rid of second constructor

This commit is contained in:
twinaphex 2017-03-28 07:55:58 +02:00
parent f213a4efa8
commit 2ce23ee29f
3 changed files with 5 additions and 17 deletions

View File

@ -434,7 +434,11 @@ static void draw(GlRenderer *renderer)
program_uniform1ui(renderer->command_buffer->program, "texture_flt", renderer->filter_type);
// Bind the out framebuffer
Framebuffer _fb = Framebuffer(renderer->fb_out, renderer->fb_out_depth);
Framebuffer _fb = Framebuffer(renderer->fb_out);
glFramebufferTexture( GL_DRAW_FRAMEBUFFER,
GL_DEPTH_ATTACHMENT,
renderer->fb_out_depth->id,
0);
glClear(GL_DEPTH_BUFFER_BIT);

View File

@ -35,21 +35,6 @@ Framebuffer::Framebuffer(Texture* color_texture)
InitializeWithColorTexture(this, color_texture);
}
Framebuffer::Framebuffer(Texture* color_texture, Texture* depth_texture)
{
InitializeWithColorTexture(this, color_texture);
glFramebufferTexture( GL_DRAW_FRAMEBUFFER,
GL_DEPTH_ATTACHMENT,
depth_texture->id,
0);
#ifdef DEBUG
get_error();
#endif
}
Framebuffer::~Framebuffer()
{
glDeleteFramebuffers(1, &this->id);

View File

@ -11,7 +11,6 @@ public:
Texture* _color_texture;
Framebuffer(Texture* color_texture);
Framebuffer(Texture* color_texture, Texture* depth_texture);
~Framebuffer();
};