fix problem with offscreen screenshots

This commit is contained in:
David Rose 2006-10-02 17:51:29 +00:00
parent 80dbd8130b
commit 81f6d464b7

View File

@ -38,6 +38,7 @@ DisplayRegion(GraphicsOutput *window) :
_cull_region_pcollector("Cull:Invalid"), _cull_region_pcollector("Cull:Invalid"),
_draw_region_pcollector("Draw:Invalid") _draw_region_pcollector("Draw:Invalid")
{ {
_screenshot_buffer_type = window->get_draw_buffer_type();
_draw_buffer_type = window->get_draw_buffer_type(); _draw_buffer_type = window->get_draw_buffer_type();
compute_pixels_all_stages(); compute_pixels_all_stages();
} }
@ -54,6 +55,7 @@ DisplayRegion(GraphicsOutput *window, float l, float r, float b, float t) :
_cull_region_pcollector("Cull:Invalid"), _cull_region_pcollector("Cull:Invalid"),
_draw_region_pcollector("Draw:Invalid") _draw_region_pcollector("Draw:Invalid")
{ {
_screenshot_buffer_type = window->get_draw_buffer_type();
_draw_buffer_type = window->get_draw_buffer_type(); _draw_buffer_type = window->get_draw_buffer_type();
set_dimensions(l, r, b, t); set_dimensions(l, r, b, t);
compute_pixels_all_stages(); compute_pixels_all_stages();
@ -65,7 +67,7 @@ DisplayRegion(GraphicsOutput *window, float l, float r, float b, float t) :
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
DisplayRegion:: DisplayRegion::
DisplayRegion(const DisplayRegion&) : DisplayRegion(const DisplayRegion &) :
_cull_region_pcollector("Cull:Invalid"), _cull_region_pcollector("Cull:Invalid"),
_draw_region_pcollector("Draw:Invalid") _draw_region_pcollector("Draw:Invalid")
{ {