Browse Source

Fixes required to fix compiler crashes in issue #84

pull/85/head
Bill Robinson 12 years ago
parent
commit
956c1e6e57
  1. 3
      src/Magnum/Platform/ScreenedApplication.hpp
  2. 18
      src/Magnum/SceneGraph/Object.hpp

3
src/Magnum/Platform/ScreenedApplication.hpp

@ -78,7 +78,8 @@ template<class Application> void BasicScreenedApplication<Application>::viewport
/* Call viewport event after all other (because of framebuffer resizing) */ /* Call viewport event after all other (because of framebuffer resizing) */
globalViewportEvent(size); globalViewportEvent(size);
for(BasicScreen<Application>& s: *this) s.viewportEvent(size); for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen())
s->viewportEvent(size);
} }
template<class Application> void BasicScreenedApplication<Application>::drawEvent() { template<class Application> void BasicScreenedApplication<Application>::drawEvent() {

18
src/Magnum/SceneGraph/Object.hpp

@ -166,12 +166,12 @@ template<class Transformation> void Object<Transformation>::setDirty() {
if(flags & Flag::Dirty) return; if(flags & Flag::Dirty) return;
/* Make all features dirty */ /* Make all features dirty */
for(AbstractFeature<Transformation::Dimensions, typename Transformation::Type>& feature: this->features()) for (auto feature = this->features().first(); feature; feature = feature->nextFeature())
feature.markDirty(); feature->markDirty();
/* Make all children dirty */ /* Make all children dirty */
for(Object<Transformation>& child: children()) for(auto child = children().first(); child; child = child->nextSibling())
child.setDirty(); child->setDirty();
/* Mark object as dirty */ /* Mark object as dirty */
flags |= Flag::Dirty; flags |= Flag::Dirty;
@ -508,28 +508,28 @@ template<class Transformation> void Object<Transformation>::setCleanInternal(con
MatrixType matrix, invertedMatrix; MatrixType matrix, invertedMatrix;
/* Clean all features */ /* Clean all features */
for(AbstractFeature<Transformation::Dimensions, typename Transformation::Type>& feature: this->features()) { for (auto feature = this->features().first(); feature; feature = feature->nextFeature()) {
/* Cached absolute transformation, compute it if it wasn't /* Cached absolute transformation, compute it if it wasn't
computed already */ computed already */
if(feature.cachedTransformations() & CachedTransformation::Absolute) { if(feature->cachedTransformations() & CachedTransformation::Absolute) {
if(!(cached & CachedTransformation::Absolute)) { if(!(cached & CachedTransformation::Absolute)) {
cached |= CachedTransformation::Absolute; cached |= CachedTransformation::Absolute;
matrix = Implementation::Transformation<Transformation>::toMatrix(absoluteTransformation); matrix = Implementation::Transformation<Transformation>::toMatrix(absoluteTransformation);
} }
feature.clean(matrix); feature->clean(matrix);
} }
/* Cached inverse absolute transformation, compute it if it wasn't /* Cached inverse absolute transformation, compute it if it wasn't
computed already */ computed already */
if(feature.cachedTransformations() & CachedTransformation::InvertedAbsolute) { if(feature->cachedTransformations() & CachedTransformation::InvertedAbsolute) {
if(!(cached & CachedTransformation::InvertedAbsolute)) { if(!(cached & CachedTransformation::InvertedAbsolute)) {
cached |= CachedTransformation::InvertedAbsolute; cached |= CachedTransformation::InvertedAbsolute;
invertedMatrix = Implementation::Transformation<Transformation>::toMatrix( invertedMatrix = Implementation::Transformation<Transformation>::toMatrix(
Implementation::Transformation<Transformation>::inverted(absoluteTransformation)); Implementation::Transformation<Transformation>::inverted(absoluteTransformation));
} }
feature.cleanInverted(invertedMatrix); feature->cleanInverted(invertedMatrix);
} }
} }

Loading…
Cancel
Save