If last framebuffer texture isn't set, use active framebuffer otherwise don't draw.
This commit is contained in:
parent
919d3d080b
commit
ab93a6bf64
|
@ -396,19 +396,24 @@ void GL4CommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
|
||||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
// HACK: just use whatever our current framebuffer is.
|
// HACK: just use whatever our current framebuffer is.
|
||||||
GLuint framebuffer_texture = last_framebuffer_texture_;
|
GLuint framebuffer_texture = last_framebuffer_texture_;
|
||||||
/*GLuint framebuffer_texture = active_framebuffer_
|
|
||||||
? active_framebuffer_->color_targets[0]
|
if (last_framebuffer_texture_ == 0) {
|
||||||
: last_framebuffer_texture_;*/
|
framebuffer_texture =
|
||||||
|
active_framebuffer_ ? active_framebuffer_->color_targets[0] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Copy the the given framebuffer to the current backbuffer.
|
// Copy the the given framebuffer to the current backbuffer.
|
||||||
Rect2D src_rect(0, 0, frontbuffer_width ? frontbuffer_width : 1280,
|
Rect2D src_rect(0, 0, frontbuffer_width ? frontbuffer_width : 1280,
|
||||||
frontbuffer_height ? frontbuffer_height : 720);
|
frontbuffer_height ? frontbuffer_height : 720);
|
||||||
Rect2D dest_rect(0, 0, swap_state_.width, swap_state_.height);
|
Rect2D dest_rect(0, 0, swap_state_.width, swap_state_.height);
|
||||||
reinterpret_cast<xe::ui::gl::GLContext*>(context_.get())
|
if (framebuffer_texture != 0) {
|
||||||
->blitter()
|
reinterpret_cast<xe::ui::gl::GLContext*>(context_.get())
|
||||||
->CopyColorTexture2D(framebuffer_texture, src_rect,
|
->blitter()
|
||||||
static_cast<GLuint>(swap_state_.back_buffer_texture),
|
->CopyColorTexture2D(
|
||||||
dest_rect, GL_LINEAR, true);
|
framebuffer_texture, src_rect,
|
||||||
|
static_cast<GLuint>(swap_state_.back_buffer_texture), dest_rect,
|
||||||
|
GL_LINEAR, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (FLAGS_draw_all_framebuffers) {
|
if (FLAGS_draw_all_framebuffers) {
|
||||||
int32_t offsetx = (1280 - (1280 / 5));
|
int32_t offsetx = (1280 - (1280 / 5));
|
||||||
|
|
Loading…
Reference in New Issue