diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d2b7f586c..d6210df9f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4422,36 +4422,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei render_ui(scale_factor, subfield); } -#if 0//SHY_MOD // screenshot improvement - /* - //No longer doing this. glReadPixels can behave unpredictably between depth formats. May be the case for color formats as well. - if(scale_factor <= 1.f && image_width == image_buffer_x && image_height == image_buffer_y) //faster. bulk copy opposed to line per line - { - if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR) - { - glReadPixels(0,0,image_width, image_height,GL_RGB, GL_UNSIGNED_BYTE,raw->getData()); - continue; - } - //Buggered with GL_DEPTH_COMPONENT32_ARB, which flips the image upside down. - /*else // SNAPSHOT_TYPE_DEPTH - { - //S32 desired_components = raw->getComponents(); - raw->resize(image_width,image_height,sizeof(FLOAT)); - glReadPixels(0, 0,image_width,image_height, GL_DEPTH_COMPONENT, GL_FLOAT,raw->getData()); - raw->setSize(image_width,image_height,desired_components);//Set components without reallocating - for(int i = 0;igetData() + (i * sizeof(F32))); - F32 linear_depth_float = 1.f / (depth_conversion_factor_1 - (depth_float * depth_conversion_factor_2)); - U8 depth_byte = F32_to_U8(linear_depth_float, LLViewerCamera::getInstance()->getNear(), LLViewerCamera::getInstance()->getFar()); - for(S32 j = 0; j < raw->getComponents(); j++) - raw->getData()[i*raw->getComponents()+j] = depth_byte; - } - raw->reallocateData(image_width*image_height*raw->getComponents()*sizeof(U8)); //Reallocate without erasing data - continue; - } - }*/ -#endif //shy_mod S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width); // handle fractional rows U32 read_width = llmax(0, (window_width - subimage_x_offset) -