Showing the changes to interface/src/Application.cpp (1 of 38 files). Show all
Unified · Split
| @@ -2234,8 +2234,7 @@ void Application::updateShadowMap() { · 2233 unmodified lines | ||
| 2234 | 2234 | glRotatef(glm::degrees(glm::angle(inverseRotation)), axis.x, axis.y, axis.z); |
| 2235 | 2235 | |
| 2236 | 2236 | // store view matrix without translation, which we'll use for precision-sensitive objects |
| 2237 | − glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix); | |
| 2238 | − _viewMatrixTranslation = glm::vec3(); | |
| 2237 | + updateUntranslatedViewMatrix(); | |
| 2239 | 2238 | |
| 2240 | 2239 | _avatarManager.renderAvatars(Avatar::SHADOW_RENDER_MODE); |
| 2241 | 2240 | _particles.render(); |
| @@ -2320,8 +2319,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 78 unmodified lines | ||
| 2320 | 2319 | glRotatef(-glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z); |
| 2321 | 2320 | |
| 2322 | 2321 | // store view matrix without translation, which we'll use for precision-sensitive objects |
| 2323 | − glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix); | |
| 2324 | − _viewMatrixTranslation = -whichCamera.getPosition(); | |
| 2322 | + updateUntranslatedViewMatrix(-whichCamera.getPosition()); | |
| 2325 | 2323 | |
| 2326 | 2324 | glTranslatef(_viewMatrixTranslation.x, _viewMatrixTranslation.y, _viewMatrixTranslation.z); |
| 2327 | 2325 | |
| @@ -2452,6 +2450,11 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 124 unmodified lines | ||
| 2452 | 2450 | } |
| 2453 | 2451 | } |
| 2454 | 2452 | |
| 2453 | +void Application::updateUntranslatedViewMatrix(const glm::vec3& viewMatrixTranslation) { | |
| 2454 | + glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix); | |
| 2455 | + _viewMatrixTranslation = viewMatrixTranslation; | |
| 2456 | +} | |
| 2457 | + | |
| 2455 | 2458 | void Application::loadTranslatedViewMatrix(const glm::vec3& translation) { |
| 2456 | 2459 | glLoadMatrixf((const GLfloat*)&_untranslatedViewMatrix); |
| 2457 | 2460 | glTranslatef(translation.x + _viewMatrixTranslation.x, translation.y + _viewMatrixTranslation.y, |
| @@ -3249,9 +3252,12 @@ void Application::toggleRunningScriptsWidget() · 791 unmodified lines | ||
| 3249 | 3252 | |
| 3250 | 3253 | void Application::uploadFST(bool isHead) { |
| 3251 | 3254 | ModelUploader* uploader = new ModelUploader(isHead); |
| 3252 | − if (uploader->zip()) { | |
| 3253 | − uploader->send(); | |
| 3254 | − } | |
| 3255 | + QThread* thread = new QThread(); | |
| 3256 | + thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit())); | |
| 3257 | + thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater())); | |
| 3258 | + uploader->connect(thread, SIGNAL(started()), SLOT(send())); | |
| 3259 | + | |
| 3260 | + thread->start(); | |
| 3255 | 3261 | } |
| 3256 | 3262 | |
| 3257 | 3263 | void Application::uploadHead() { |
| @@ -3278,6 +3284,7 @@ void Application::loadScript(const QString& scriptName) { · 20 unmodified lines | ||
| 3278 | 3284 | // we can use the same ones from the application. |
| 3279 | 3285 | scriptEngine->getVoxelsScriptingInterface()->setPacketSender(&_voxelEditSender); |
| 3280 | 3286 | scriptEngine->getVoxelsScriptingInterface()->setVoxelTree(_voxels.getTree()); |
| 3287 | + scriptEngine->getVoxelsScriptingInterface()->setUndoStack(&_undoStack); | |
| 3281 | 3288 | scriptEngine->getParticlesScriptingInterface()->setPacketSender(&_particleEditSender); |
| 3282 | 3289 | scriptEngine->getParticlesScriptingInterface()->setParticleTree(_particles.getTree()); |
| 3283 | 3290 | |