mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Merge pull request #4527 from sethalves/valgrind
Valgrind told me to do it
This commit is contained in:
commit
2404fb126f
13 changed files with 23 additions and 13 deletions
|
@ -149,7 +149,8 @@ void AvatarMixer::broadcastAvatarData() {
|
||||||
// about a given otherNode to this node
|
// about a given otherNode to this node
|
||||||
// FIXME does this mean we should sort the othernodes by distance before iterating
|
// FIXME does this mean we should sort the othernodes by distance before iterating
|
||||||
// over them?
|
// over them?
|
||||||
float outputBandwidth = node->getOutboundBandwidth();
|
// float outputBandwidth =
|
||||||
|
node->getOutboundBandwidth();
|
||||||
|
|
||||||
// this is an AGENT we have received head data from
|
// this is an AGENT we have received head data from
|
||||||
// send back a packet with other active node data to this node
|
// send back a packet with other active node data to this node
|
||||||
|
@ -169,7 +170,7 @@ void AvatarMixer::broadcastAvatarData() {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
[&](const SharedNodePointer& otherNode) {
|
[&](const SharedNodePointer& otherNode) {
|
||||||
AvatarMixerClientData* otherNodeData = otherNodeData = reinterpret_cast<AvatarMixerClientData*>(otherNode->getLinkedData());
|
AvatarMixerClientData* otherNodeData = reinterpret_cast<AvatarMixerClientData*>(otherNode->getLinkedData());
|
||||||
MutexTryLocker lock(otherNodeData->getMutex());
|
MutexTryLocker lock(otherNodeData->getMutex());
|
||||||
if (!lock.isLocked()) {
|
if (!lock.isLocked()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -3126,7 +3126,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) {
|
||||||
int viewport[4];
|
int viewport[4];
|
||||||
glGetIntegerv(GL_VIEWPORT, viewport);
|
glGetIntegerv(GL_VIEWPORT, viewport);
|
||||||
|
|
||||||
bool eyeRelativeCamera = false;
|
// bool eyeRelativeCamera = false;
|
||||||
if (billboard) {
|
if (billboard) {
|
||||||
_mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW); // degees
|
_mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW); // degees
|
||||||
_mirrorCamera.setPosition(_myAvatar->getPosition() +
|
_mirrorCamera.setPosition(_myAvatar->getPosition() +
|
||||||
|
|
|
@ -353,7 +353,7 @@ void InputController::update() {
|
||||||
// TODO for now the InputController is only supporting a JointTracker from a MotionTracker
|
// TODO for now the InputController is only supporting a JointTracker from a MotionTracker
|
||||||
MotionTracker* motionTracker = dynamic_cast< MotionTracker*> (DeviceTracker::getDevice(_deviceTrackerId));
|
MotionTracker* motionTracker = dynamic_cast< MotionTracker*> (DeviceTracker::getDevice(_deviceTrackerId));
|
||||||
if (motionTracker) {
|
if (motionTracker) {
|
||||||
if (_subTrackerId < motionTracker->numJointTrackers()) {
|
if ((int)_subTrackerId < motionTracker->numJointTrackers()) {
|
||||||
const MotionTracker::JointTracker* joint = motionTracker->getJointTracker(_subTrackerId);
|
const MotionTracker::JointTracker* joint = motionTracker->getJointTracker(_subTrackerId);
|
||||||
|
|
||||||
if (joint->isActive()) {
|
if (joint->isActive()) {
|
||||||
|
|
|
@ -139,6 +139,7 @@ ApplicationOverlay::ApplicationOverlay() :
|
||||||
_magnifier(true),
|
_magnifier(true),
|
||||||
_alpha(1.0f),
|
_alpha(1.0f),
|
||||||
_oculusUIRadius(1.0f),
|
_oculusUIRadius(1.0f),
|
||||||
|
_trailingAudioLoudness(0.0f),
|
||||||
_crosshairTexture(0),
|
_crosshairTexture(0),
|
||||||
_previousBorderWidth(-1),
|
_previousBorderWidth(-1),
|
||||||
_previousBorderHeight(-1),
|
_previousBorderHeight(-1),
|
||||||
|
|
|
@ -88,9 +88,9 @@ template< typename T >
|
||||||
void AudioFrameBuffer< T >::deallocateFrames() {
|
void AudioFrameBuffer< T >::deallocateFrames() {
|
||||||
if (_frameBuffer) {
|
if (_frameBuffer) {
|
||||||
for (uint32_t i = 0; i < _channelCountMax; ++i) {
|
for (uint32_t i = 0; i < _channelCountMax; ++i) {
|
||||||
delete _frameBuffer[i];
|
delete[] _frameBuffer[i];
|
||||||
}
|
}
|
||||||
delete _frameBuffer;
|
delete[] _frameBuffer;
|
||||||
}
|
}
|
||||||
_frameBuffer = NULL;
|
_frameBuffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadProfile(int profileIndex) {
|
void loadProfile(int profileIndex) {
|
||||||
if (profileIndex >= 0 && profileIndex < _profileCount) {
|
if (profileIndex >= 0 && profileIndex < (int)_profileCount) {
|
||||||
|
|
||||||
for (uint32_t i = 0; i < _filterCount; ++i) {
|
for (uint32_t i = 0; i < _filterCount; ++i) {
|
||||||
FilterParameter p = _profiles[profileIndex][i];
|
FilterParameter p = _profiles[profileIndex][i];
|
||||||
|
|
|
@ -95,7 +95,6 @@ public:
|
||||||
|
|
||||||
void deleteEntity(const EntityItemID& entityID, bool force = false, bool ignoreWarnings = false);
|
void deleteEntity(const EntityItemID& entityID, bool force = false, bool ignoreWarnings = false);
|
||||||
void deleteEntities(QSet<EntityItemID> entityIDs, bool force = false, bool ignoreWarnings = false);
|
void deleteEntities(QSet<EntityItemID> entityIDs, bool force = false, bool ignoreWarnings = false);
|
||||||
void removeEntityFromSimulation(EntityItem* entity);
|
|
||||||
|
|
||||||
/// \param position point of query in world-frame (meters)
|
/// \param position point of query in world-frame (meters)
|
||||||
/// \param targetRadius radius of query (meters)
|
/// \param targetRadius radius of query (meters)
|
||||||
|
|
|
@ -235,7 +235,9 @@ CharacterController::CharacterController(AvatarData* avatarData) {
|
||||||
_jumpToHoverStart = 0;
|
_jumpToHoverStart = 0;
|
||||||
setMaxSlope(btRadians(45.0f));
|
setMaxSlope(btRadians(45.0f));
|
||||||
_lastStepUp = 0.0f;
|
_lastStepUp = 0.0f;
|
||||||
_pendingFlags = 0;
|
|
||||||
|
_pendingFlags = PENDING_FLAG_UPDATE_SHAPE;
|
||||||
|
updateShapeIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
CharacterController::~CharacterController() {
|
CharacterController::~CharacterController() {
|
||||||
|
|
|
@ -29,6 +29,12 @@ PhysicsEngine::PhysicsEngine(const glm::vec3& offset)
|
||||||
|
|
||||||
PhysicsEngine::~PhysicsEngine() {
|
PhysicsEngine::~PhysicsEngine() {
|
||||||
// TODO: delete engine components... if we ever plan to create more than one instance
|
// TODO: delete engine components... if we ever plan to create more than one instance
|
||||||
|
delete _collisionConfig;
|
||||||
|
delete _collisionDispatcher;
|
||||||
|
delete _broadphaseFilter;
|
||||||
|
delete _constraintSolver;
|
||||||
|
delete _dynamicsWorld;
|
||||||
|
// delete _ghostPairCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
// begin EntitySimulation overrides
|
// begin EntitySimulation overrides
|
||||||
|
|
|
@ -134,7 +134,7 @@ void DeferredLightingEffect::addPointLight(const glm::vec3& position, float radi
|
||||||
void DeferredLightingEffect::addSpotLight(const glm::vec3& position, float radius, const glm::vec3& color,
|
void DeferredLightingEffect::addSpotLight(const glm::vec3& position, float radius, const glm::vec3& color,
|
||||||
float intensity, const glm::quat& orientation, float exponent, float cutoff) {
|
float intensity, const glm::quat& orientation, float exponent, float cutoff) {
|
||||||
|
|
||||||
int lightID = _pointLights.size() + _spotLights.size() + _globalLights.size();
|
unsigned int lightID = _pointLights.size() + _spotLights.size() + _globalLights.size();
|
||||||
if (lightID >= _allocatedLights.size()) {
|
if (lightID >= _allocatedLights.size()) {
|
||||||
_allocatedLights.push_back(model::LightPointer(new model::Light()));
|
_allocatedLights.push_back(model::LightPointer(new model::Light()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
SimpleMovingAverage::SimpleMovingAverage(int numSamplesToAverage) :
|
SimpleMovingAverage::SimpleMovingAverage(int numSamplesToAverage) :
|
||||||
_numSamples(0),
|
_numSamples(0),
|
||||||
|
_lastEventTimestamp(0),
|
||||||
_average(0.0f),
|
_average(0.0f),
|
||||||
_eventDeltaAverage(0.0f),
|
_eventDeltaAverage(0.0f),
|
||||||
WEIGHTING(1.0f / numSamplesToAverage),
|
WEIGHTING(1.0f / numSamplesToAverage),
|
||||||
|
|
|
@ -8,5 +8,5 @@ set_target_properties(scribe PROPERTIES FOLDER "Tools")
|
||||||
find_package(VHACD)
|
find_package(VHACD)
|
||||||
if(VHACD_FOUND)
|
if(VHACD_FOUND)
|
||||||
add_subdirectory(vhacd)
|
add_subdirectory(vhacd)
|
||||||
set_target_properties(vhacd PROPERTIES FOLDER "Tools")
|
# set_target_properties(vhacd PROPERTIES FOLDER "Tools")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
rm -f TAGS
|
rm -f TAGS
|
||||||
|
|
||||||
find . -name *.h -print | while read I
|
find . -name *.h -print | grep -v build-ext |while read I
|
||||||
do
|
do
|
||||||
etags --append "$I"
|
etags --append "$I"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
find . -name *.cpp -print | grep -v 'moc_' | while read I
|
find . -name *.cpp -print | grep -v 'moc_' | grep -v build-ext | while read I
|
||||||
do
|
do
|
||||||
etags --append "$I"
|
etags --append "$I"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue