Brett 2024-05-06 15:48:42 -04:00
parent 6fb5d48ba9
commit eaf15046b4
2 changed files with 15 additions and 15 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.25)
set(BLT_GRAPHICS_VERSION 0.13.7)
set(BLT_GRAPHICS_VERSION 0.13.8)
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})

View File

@ -145,20 +145,20 @@ namespace blt::gfx
void pp_in_place_t::post_draw(frame_buffer_t& previous)
{
//draw_buffer.blitTexture(previous, 0, 0, 0, 0, GL_NEAREST, from, to);
previous.bind();
GLenum buf[32];
auto buff_val = static_cast<GLenum>(to);
auto size = buff_val - GL_COLOR_ATTACHMENT0;
for (GLenum i = 0; i < size; i++)
buf[i] = GL_NONE;
buf[size] = buff_val;
glDrawBuffers(static_cast<int>(size) + 1, buf);
glClear(GL_COLOR_BUFFER_BIT);
shader_pass->bind();
glActiveTexture(GL_TEXTURE0);
draw_buffer.getTexture(frame_buffer_t::attachment_t::COLOR0).bind();
pp_engine_t::render_quad();
draw_buffer.blitTexture(previous, 0, 0, 0, 0, GL_NEAREST, from, to);
// previous.bind();
// GLenum buf[32];
// auto buff_val = static_cast<GLenum>(to);
// auto size = buff_val - GL_COLOR_ATTACHMENT0;
// for (GLenum i = 0; i < size; i++)
// buf[i] = GL_NONE;
// buf[size] = buff_val;
// glDrawBuffers(static_cast<int>(size) + 1, buf);
// glClear(GL_COLOR_BUFFER_BIT);
// shader_pass->bind();
// glActiveTexture(GL_TEXTURE0);
// draw_buffer.getTexture(frame_buffer_t::attachment_t::COLOR0).bind();
// pp_engine_t::render_quad();
}
void pp_in_place_t::draw(frame_buffer_t& previous)