Merge git://github.com/Shyotl/SingularityViewer

This commit is contained in:
siana
2011-02-20 04:13:50 +01:00
4 changed files with 16 additions and 20 deletions

View File

@@ -428,7 +428,8 @@ void LLPostProcess::doEffects(void)
/// Clear the frame buffer.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
LLGLDisable(GL_DEPTH_TEST);
/// Change to an orthogonal view
viewOrthogonal(screenW, screenH);

View File

@@ -243,6 +243,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLRect& rect) :
mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ;
mThumbnailUpdateLock = FALSE ;
mThumbnailUpToDate = FALSE ;
updateSnapshot(TRUE,TRUE); //To initialize mImageRect to correct values
}
LLSnapshotLivePreview::~LLSnapshotLivePreview()
@@ -880,7 +881,17 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP);
previewp->mSnapshotUpToDate = TRUE;
previewp->generateThumbnailImage(TRUE) ;
//Resize to thumbnail.
{
previewp->mThumbnailUpToDate = TRUE ;
previewp->mThumbnailUpdateLock = TRUE ;
S32 w = get_lower_power_two(scaled->getWidth(), 512) * 2 ;
S32 h = get_lower_power_two(scaled->getHeight(), 512) * 2 ;
scaled->scale(w,h);
previewp->mThumbnailImage = new LLImageGL(scaled, FALSE);
previewp->mThumbnailUpdateLock = FALSE ;
previewp->setThumbnailImageSize();
}
previewp->mPosTakenGlobal = gAgent.getCameraPositionGlobal();
previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame
@@ -1236,7 +1247,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
{
std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee();
floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", fee);
LLRadioGroup* snapshot_type_radio = floater->getChild<LLRadioGroup>("snapshot_type_radio");
if (snapshot_type_radio)
{

View File

@@ -105,7 +105,7 @@ BOOL LLPanelLogin::sCapslockDidNotification = FALSE;
static bool nameSplit(const std::string& full, std::string& first, std::string& last) {
std::vector<std::string> fragments;
boost::algorithm::split(fragments, full, boost::is_any_of(" ."));
if (fragments.size() == 0)
if (!fragments.size() || !fragments[0].length())
return false;
first = fragments[0];
if (fragments.size() == 1)

View File

@@ -4422,22 +4422,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
render_ui(scale_factor, subfield);
}
#if SHY_MOD // screenshot improvement
if(scale_factor <= 1.f) //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());
}
else // SNAPSHOT_TYPE_DEPTH
{
LLPointer<LLImageRaw> depth_line_buffer = new LLImageRaw(image_width, image_height, sizeof(GL_FLOAT));
glReadPixels(0, 0,image_width,image_height, GL_DEPTH_COMPONENT, GL_FLOAT,depth_line_buffer->getData());
raw->copy(depth_line_buffer);
}
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) -