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 | glRotatef(glm::degrees(glm::angle(inverseRotation)), axis.x, axis.y, axis.z); | 2234 | glRotatef(glm::degrees(glm::angle(inverseRotation)), axis.x, axis.y, axis.z); |
| 2235 | 2235 | ||
| 2236 | // store view matrix without translation, which we'll use for precision-sensitive objects | 2236 | // store view matrix without translation, which we'll use for precision-sensitive objects |
| 2237 | glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix); | 2237 | updateUntranslatedViewMatrix(); |
| 2238 | _viewMatrixTranslation = glm::vec3(); | ||
| 2239 | 2238 | ||
| 2240 | _avatarManager.renderAvatars(Avatar::SHADOW_RENDER_MODE); | 2239 | _avatarManager.renderAvatars(Avatar::SHADOW_RENDER_MODE); |
| 2241 | _particles.render(); | 2240 | _particles.render(); |
| @@ -2320,8 +2319,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 78 unmodified lines | |||
| 2320 | glRotatef(-glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z); | 2319 | glRotatef(-glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z); |
| 2321 | 2320 | ||
| 2322 | // store view matrix without translation, which we'll use for precision-sensitive objects | 2321 | // store view matrix without translation, which we'll use for precision-sensitive objects |
| 2323 | glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix); | 2322 | updateUntranslatedViewMatrix(-whichCamera.getPosition()); |
| 2324 | _viewMatrixTranslation = -whichCamera.getPosition(); | ||
| 2325 | 2323 | ||
| 2326 | glTranslatef(_viewMatrixTranslation.x, _viewMatrixTranslation.y, _viewMatrixTranslation.z); | 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 | void Application::loadTranslatedViewMatrix(const glm::vec3& translation) { | 2458 | void Application::loadTranslatedViewMatrix(const glm::vec3& translation) { |
| 2456 | glLoadMatrixf((const GLfloat*)&_untranslatedViewMatrix); | 2459 | glLoadMatrixf((const GLfloat*)&_untranslatedViewMatrix); |
| 2457 | glTranslatef(translation.x + _viewMatrixTranslation.x, translation.y + _viewMatrixTranslation.y, | 2460 | glTranslatef(translation.x + _viewMatrixTranslation.x, translation.y + _viewMatrixTranslation.y, |
| @@ -3249,9 +3252,12 @@ void Application::toggleRunningScriptsWidget() · 791 unmodified lines | |||
| 3249 | 3252 | ||
| 3250 | void Application::uploadFST(bool isHead) { | 3253 | void Application::uploadFST(bool isHead) { |
| 3251 | ModelUploader* uploader = new ModelUploader(isHead); | 3254 | ModelUploader* uploader = new ModelUploader(isHead); |
| 3252 | if (uploader->zip()) { | 3255 | QThread* thread = new QThread(); |
| 3253 | uploader->send(); | 3256 | thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit())); |
| 3254 | } | 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 | void Application::uploadHead() { | 3263 | void Application::uploadHead() { |
| @@ -3278,6 +3284,7 @@ void Application::loadScript(const QString& scriptName) { · 20 unmodified lines | |||
| 3278 | // we can use the same ones from the application. | 3284 | // we can use the same ones from the application. |
| 3279 | scriptEngine->getVoxelsScriptingInterface()->setPacketSender(&_voxelEditSender); | 3285 | scriptEngine->getVoxelsScriptingInterface()->setPacketSender(&_voxelEditSender); |
| 3280 | scriptEngine->getVoxelsScriptingInterface()->setVoxelTree(_voxels.getTree()); | 3286 | scriptEngine->getVoxelsScriptingInterface()->setVoxelTree(_voxels.getTree()); |
| 3287 | scriptEngine->getVoxelsScriptingInterface()->setUndoStack(&_undoStack); | ||
| 3281 | scriptEngine->getParticlesScriptingInterface()->setPacketSender(&_particleEditSender); | 3288 | scriptEngine->getParticlesScriptingInterface()->setPacketSender(&_particleEditSender); |
| 3282 | scriptEngine->getParticlesScriptingInterface()->setParticleTree(_particles.getTree()); | 3289 | scriptEngine->getParticlesScriptingInterface()->setParticleTree(_particles.getTree()); |
| 3283 | 3290 | ||