Skip to content

Commit

Permalink
* warp: fixed the fbo flipping bit in the gl renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
a2flo committed Dec 14, 2015
1 parent 19880fc commit ce5d932
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions warp/src/gl_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,14 @@ void gl_renderer::render_kernels(const float& delta, const float& render_delta,
}
else {
err = libwarp_gather(&cam_setup, relative_delta,
scene_fbo.color[1u - warp_state.cur_fbo], scene_fbo.depth[1u - warp_state.cur_fbo],
scene_fbo.color[warp_state.cur_fbo], scene_fbo.depth[warp_state.cur_fbo],
scene_fbo.motion[warp_state.cur_fbo * 2], scene_fbo.motion[(1u - warp_state.cur_fbo) * 2 + 1],
scene_fbo.motion_depth[warp_state.cur_fbo], scene_fbo.motion_depth[1u - warp_state.cur_fbo],
scene_fbo.color[1u - warp_state.cur_fbo],
scene_fbo.depth[1u - warp_state.cur_fbo],
scene_fbo.color[warp_state.cur_fbo],
scene_fbo.depth[warp_state.cur_fbo],
scene_fbo.motion[warp_state.cur_fbo * 2],
scene_fbo.motion[(1u - warp_state.cur_fbo) * 2 + 1],
scene_fbo.motion_depth[warp_state.cur_fbo],
scene_fbo.motion_depth[1u - warp_state.cur_fbo],
scene_fbo.compute_color);
}
}
Expand Down Expand Up @@ -919,7 +923,7 @@ void gl_renderer::render_full_scene(const gl_obj_model& model, const camera& cam
glDrawBuffers(1, &draw_buffers[0]); // reset to 1 draw buffer

// end
if(warp_state.is_bidir_scatter || !warp_state.is_scatter) {
if(!warp_state.is_scatter && !warp_state.is_gather_forward) {
// flip state
warp_state.cur_fbo = 1 - warp_state.cur_fbo;
}
Expand Down

0 comments on commit ce5d932

Please sign in to comment.