mesa buffers are single-buffered, and don't you forget it again

This commit is contained in:
David Rose 2007-08-07 03:30:40 +00:00
parent 1d5038e9f0
commit 47fa65c34a
2 changed files with 8 additions and 4 deletions

View File

@ -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;
}
////////////////////////////////////////////////////////////////////

View File

@ -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);
}