From 47fa65c34a52271811da54e29c7ddbbdbc5da452 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 7 Aug 2007 03:30:40 +0000 Subject: [PATCH] mesa buffers are single-buffered, and don't you forget it again --- panda/src/mesadisplay/osMesaGraphicsBuffer.cxx | 2 +- panda/src/mesadisplay/osMesaGraphicsPipe.cxx | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/panda/src/mesadisplay/osMesaGraphicsBuffer.cxx b/panda/src/mesadisplay/osMesaGraphicsBuffer.cxx index 10bb33c48c..b2bf23320a 100644 --- a/panda/src/mesadisplay/osMesaGraphicsBuffer.cxx +++ b/panda/src/mesadisplay/osMesaGraphicsBuffer.cxx @@ -39,7 +39,7 @@ OsMesaGraphicsBuffer(GraphicsPipe *pipe, GraphicsBuffer(pipe, name, fb_prop, win_prop, flags, gsg, host) { _type = GL_UNSIGNED_BYTE; - _draw_buffer_type = RenderBuffer::T_front; + _screenshot_buffer_type = _draw_buffer_type; } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/mesadisplay/osMesaGraphicsPipe.cxx b/panda/src/mesadisplay/osMesaGraphicsPipe.cxx index 01d5cc3ac4..105e3b4c2b 100644 --- a/panda/src/mesadisplay/osMesaGraphicsPipe.cxx +++ b/panda/src/mesadisplay/osMesaGraphicsPipe.cxx @@ -90,8 +90,6 @@ make_output(const string &name, if (!_is_valid) { return NULL; } - - // First thing to try: an OsMesaGraphicsBuffer if (retry == 0) { if ((!support_render_texture)|| @@ -102,7 +100,13 @@ make_output(const string &name, ((flags&BF_rtt_cumulative)!=0)) { return NULL; } - return new OsMesaGraphicsBuffer(this, name, fb_prop, win_prop, + + // We know that OsMesa windows only support single buffering. So + // don't bother asking for more than that. + FrameBufferProperties fb_prop2 = fb_prop; + fb_prop2.set_back_buffers(0); + + return new OsMesaGraphicsBuffer(this, name, fb_prop2, win_prop, flags, gsg, host); }