Browse Source

Merge branch 'master' into compatibility

Vladimír Vondruš 14 years ago
parent
commit
8d78001a90
  1. 2
      src/Context.cpp
  2. 4
      src/Context.h
  3. 2
      src/Physics/Plane.cpp
  4. 4
      src/SceneGraph/Camera.h
  5. 4
      src/SceneGraph/Object.h

2
src/Context.cpp

@ -182,7 +182,7 @@ Context::Context() {
Version::None
};
size_t future = 0;
while(versions[future] != Version::None && versions[future] < _version)
while(versions[future] != Version::None && !isVersionSupported(_version))
++future;
/* List of extensions from future versions (extensions from current and

4
src/Context.h

@ -235,7 +235,7 @@ class MAGNUM_EXPORT Context {
* @see isExtensionSupported(const Extension&) const
*/
template<class T> inline bool isExtensionSupported() const {
return _version >= T::coreVersion() || (_version >= T::requiredVersion() && extensionStatus[T::Index]);
return isVersionSupported(T::coreVersion()) || (isVersionSupported(T::requiredVersion()) && extensionStatus[T::Index]);
}
/**
@ -248,7 +248,7 @@ class MAGNUM_EXPORT Context {
* @see supportedExtensions(), Extension::extensions()
*/
inline bool isExtensionSupported(const Extension& extension) const {
return _version >= extension._coreVersion || (_version >= extension._requiredVersion && extensionStatus[extension._index]);
return isVersionSupported(extension._coreVersion) || (isVersionSupported(extension._requiredVersion) && extensionStatus[extension._index]);
}
#ifndef DOXYGEN_GENERATING_OUTPUT

2
src/Physics/Plane.cpp

@ -38,7 +38,7 @@ bool Plane::collides(const AbstractShape<3>* other) const {
if(other->type() == Type::LineSegment)
return *this % *static_cast<const LineSegment3D*>(other);
return AbstractShape::collides(other);
return AbstractShape<3>::collides(other);
}
bool Plane::operator%(const Line3D& other) const {

4
src/SceneGraph/Camera.h

@ -193,7 +193,7 @@ class SCENEGRAPH_EXPORT Camera2D: public AbstractCamera<2> {
* Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions).
* @see setOrthographic()
*/
inline Camera2D(Object2D* parent = nullptr): AbstractCamera(parent) {}
inline Camera2D(Object2D* parent = nullptr): AbstractCamera<2>(parent) {}
/**
* @brief Set projection
@ -220,7 +220,7 @@ class SCENEGRAPH_EXPORT Camera3D: public AbstractCamera<3> {
* Sets orthographic projection to the default OpenGL cube (range @f$ [-1; 1] @f$ in all directions).
* @see setOrthographic(), setPerspective()
*/
inline Camera3D(Object3D* parent = nullptr): AbstractCamera(parent), _near(0.0f), _far(0.0f) {}
inline Camera3D(Object3D* parent = nullptr): AbstractCamera<3>(parent), _near(0.0f), _far(0.0f) {}
/**
* @brief Set orthographic projection

4
src/SceneGraph/Object.h

@ -320,7 +320,7 @@ template<std::uint8_t dimensions> inline void AbstractObject<dimensions>::clean(
class SCENEGRAPH_EXPORT Object2D: public AbstractObject<2> {
public:
/** @copydoc AbstractObject::AbstractObject() */
inline Object2D(Object2D* parent = nullptr): AbstractObject(parent) {}
inline Object2D(Object2D* parent = nullptr): AbstractObject<2>(parent) {}
/**
* @brief Translate object
@ -375,7 +375,7 @@ class SCENEGRAPH_EXPORT Object2D: public AbstractObject<2> {
class SCENEGRAPH_EXPORT Object3D: public AbstractObject<3> {
public:
/** @copydoc AbstractObject::AbstractObject() */
inline Object3D(Object3D* parent = nullptr): AbstractObject(parent) {}
inline Object3D(Object3D* parent = nullptr): AbstractObject<3>(parent) {}
/**
* @brief Translate object

Loading…
Cancel
Save