History

fade on texture load

SamGondelman committed 10 years ago

Commit 313ba871 parent 217a1023 files · +14 −12Browse files

Showing the changes to libraries/render-utils/src/Model.cpp (1 of 3 files). Show all

Unified · Split

libraries/render-utils/src/Model.cpp+4−0
@@ -207,6 +207,10 @@ void Model::updateRenderItems() { · 206 unmodified lines
207 render::PendingChanges pendingChanges;207 render::PendingChanges pendingChanges;
208 foreach (auto itemID, self->_modelMeshRenderItems.keys()) {208 foreach (auto itemID, self->_modelMeshRenderItems.keys()) {
209 pendingChanges.updateItem<ModelMeshPartPayload>(itemID, [modelTransform, modelMeshOffset, deleteGeometryCounter](ModelMeshPartPayload& data) {209 pendingChanges.updateItem<ModelMeshPartPayload>(itemID, [modelTransform, modelMeshOffset, deleteGeometryCounter](ModelMeshPartPayload& data) {
210 if (!data.hasStartedFade() && data._model && data._model->isLoaded() && data._model->getGeometry()->areTexturesLoaded()) {
211 data.startFade();
212 data.setHasStartedFade(true);
213 }
210 // Ensure the model geometry was not reset between frames214 // Ensure the model geometry was not reset between frames
211 if (data._model && data._model->isLoaded() && deleteGeometryCounter == data._model->_deleteGeometryCounter) {215 if (data._model && data._model->isLoaded() && deleteGeometryCounter == data._model->_deleteGeometryCounter) {
212 // lazy update of cluster matrices used for rendering. We need to update them here, so we can correctly update the bounding box.216 // lazy update of cluster matrices used for rendering. We need to update them here, so we can correctly update the bounding box.

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