mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 22:07:03 +02:00
Added check on EntityItem::getEntitiesShouldFadeFunction and reactivated fade on model, voxels and polylines
This commit is contained in:
parent
1336582c6b
commit
8a2fd01e81
3 changed files with 18 additions and 8 deletions
|
@ -32,7 +32,7 @@
|
|||
#include "RenderableModelEntityItem.h"
|
||||
#include "RenderableEntityItem.h"
|
||||
|
||||
//#define USE_FADE_EFFECT
|
||||
#define USE_FADE_EFFECT
|
||||
|
||||
static CollisionRenderMeshCache collisionMeshCache;
|
||||
|
||||
|
@ -248,7 +248,9 @@ bool RenderableModelEntityItem::addToScene(const EntityItemPointer& self, const
|
|||
_model->addToScene(scene, transaction, statusGetters);
|
||||
#ifdef USE_FADE_EFFECT
|
||||
if (!_hasTransitioned) {
|
||||
transaction.addTransitionToItem(_myMetaItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
if (EntityItem::getEntitiesShouldFadeFunction()()) {
|
||||
transaction.addTransitionToItem(_myMetaItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
}
|
||||
_hasTransitioned = true;
|
||||
}
|
||||
#endif
|
||||
|
@ -488,7 +490,9 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
|||
|
||||
#ifdef USE_FADE_EFFECT
|
||||
if (!_hasTransitioned) {
|
||||
transaction.addTransitionToItem(_myMetaItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
if (EntityItem::getEntitiesShouldFadeFunction()()) {
|
||||
transaction.addTransitionToItem(_myMetaItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
}
|
||||
_hasTransitioned = true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <PathUtils.h>
|
||||
#include <PerfStat.h>
|
||||
|
||||
//#define USE_FADE_EFFECT
|
||||
#define USE_FADE_EFFECT
|
||||
#ifdef USE_FADE_EFFECT
|
||||
# include <FadeEffect.h>
|
||||
#endif
|
||||
|
@ -249,7 +249,9 @@ bool RenderablePolyLineEntityItem::addToScene(const EntityItemPointer& self,
|
|||
|
||||
transaction.resetItem(_myItem, renderPayload);
|
||||
#ifdef USE_FADE_EFFECT
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
if (EntityItem::getEntitiesShouldFadeFunction()()) {
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
}
|
||||
#endif
|
||||
updateMesh();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <model-networking/SimpleMeshProxy.h>
|
||||
#include "ModelScriptingInterface.h"
|
||||
|
||||
//#define USE_FADE_EFFECT
|
||||
#define USE_FADE_EFFECT
|
||||
#ifdef USE_FADE_EFFECT
|
||||
# include <FadeEffect.h>
|
||||
#endif
|
||||
|
@ -814,7 +814,9 @@ bool RenderablePolyVoxEntityItem::addToScene(const EntityItemPointer& self,
|
|||
transaction.resetItem(_myItem, renderPayload);
|
||||
#ifdef USE_FADE_EFFECT
|
||||
if (_mesh && _mesh->getIndexBuffer()._buffer) {
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
if (EntityItem::getEntitiesShouldFadeFunction()()) {
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
}
|
||||
_hasTransitioned = true;
|
||||
}
|
||||
#endif
|
||||
|
@ -1408,7 +1410,9 @@ void RenderablePolyVoxEntityItem::setMesh(model::MeshPointer mesh) {
|
|||
if (!_hasTransitioned) {
|
||||
render::Transaction transaction;
|
||||
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
if (EntityItem::getEntitiesShouldFadeFunction()()) {
|
||||
transaction.addTransitionToItem(_myItem, render::Transition::ELEMENT_ENTER_DOMAIN);
|
||||
}
|
||||
scene->enqueueTransaction(transaction);
|
||||
_hasTransitioned = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue