History

Merge branch 'master' of https://github.com/highfidelity/hifi into authentication

Stephen Birarda committed 12 years ago

Commit 66817542 parents ea61ccf 8e097be38 files · +1152 −268Browse files

Showing the changes to interface/src/Application.cpp (1 of 38 files). Show all

Unified · Split

interface/src/Application.cpp+14−7
@@ -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 objects2236 // 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 objects2321 // 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
2453void Application::updateUntranslatedViewMatrix(const glm::vec3& viewMatrixTranslation) {
2454 glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix);
2455 _viewMatrixTranslation = viewMatrixTranslation;
2456}
2457
2455void Application::loadTranslatedViewMatrix(const glm::vec3& translation) {2458void 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
3250void Application::uploadFST(bool isHead) {3253void 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
3257void Application::uploadHead() {3263void 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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t