mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:29:01 +02:00
handle transitions to/from STATIC_MESH
when rendering collision geometry
This commit is contained in:
parent
68dd66daec
commit
83426fd5a8
1 changed files with 5 additions and 7 deletions
|
@ -438,13 +438,11 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
||||||
remapTextures();
|
remapTextures();
|
||||||
|
|
||||||
// update whether the model should be showing collision mesh (this may flag for fixupInScene)
|
// update whether the model should be showing collision mesh (this may flag for fixupInScene)
|
||||||
ShapeType type = getShapeType();
|
bool showingCollisionGeometry = (bool)(args->_debugFlags & (int)RenderArgs::RENDER_DEBUG_HULLS);
|
||||||
bool shouldShowCollisionGeometry = type != SHAPE_TYPE_STATIC_MESH &&
|
if (showingCollisionGeometry != _showCollisionGeometry) {
|
||||||
type != SHAPE_TYPE_NONE &&
|
ShapeType type = getShapeType();
|
||||||
(args->_debugFlags & (int)RenderArgs::RENDER_DEBUG_HULLS) > 0;
|
_showCollisionGeometry = showingCollisionGeometry;
|
||||||
if (shouldShowCollisionGeometry != _showCollisionGeometry) {
|
if (_showCollisionGeometry && type != SHAPE_TYPE_STATIC_MESH && type != SHAPE_TYPE_NONE) {
|
||||||
_showCollisionGeometry = shouldShowCollisionGeometry;
|
|
||||||
if (_showCollisionGeometry) {
|
|
||||||
// NOTE: it is OK if _collisionMeshKey is nullptr
|
// NOTE: it is OK if _collisionMeshKey is nullptr
|
||||||
model::MeshPointer mesh = collisionMeshCache.getMesh(_collisionMeshKey);
|
model::MeshPointer mesh = collisionMeshCache.getMesh(_collisionMeshKey);
|
||||||
// NOTE: the model will render the collisionGeometry if it has one
|
// NOTE: the model will render the collisionGeometry if it has one
|
||||||
|
|
Loading…
Reference in a new issue