Browse Source

Merge branch 'master' into compatibility

Vladimír Vondruš 11 years ago
parent
commit
fc936c4d2b
  1. 4
      package/archlinux/PKGBUILD-gcc47
  2. 2
      src/CMakeLists.txt
  3. 7
      src/Magnum/Framebuffer.cpp
  4. 2
      src/Magnum/Implementation/setupDriverWorkarounds.cpp
  5. 3
      src/Magnum/MeshView.h
  6. 6
      src/Magnum/ResourceManager.hpp
  7. 2
      src/Magnum/SceneGraph/AbstractTranslationRotation2D.h
  8. 4
      src/Magnum/SceneGraph/AbstractTranslationRotation3D.h
  9. 3
      src/Magnum/Shaders/Flat.h
  10. 2
      src/MagnumExternal/OpenGL/GL/CMakeLists.txt

4
package/archlinux/PKGBUILD-gcc47

@ -14,6 +14,10 @@ provides=('magnum-git')
_rootdir=$startdir/../../
build() {
# Disable flags unknown to GCC 4.7
newcxxflags=$(echo $CXXFLAGS | sed s/-fstack-protector-strong.//g)
export CXXFLAGS="$newcxxflags"
if [ ! -d "$_rootdir/build-gcc47" ] ; then
mkdir "$_rootdir/build-gcc47"
cd "$_rootdir/build-gcc47"

2
src/CMakeLists.txt

@ -39,7 +39,7 @@ endif()
#
# Disable it also for GCC 4.4, as it breaks non-const Matrix[34]::up()
# etc. accessors (and I have no better solution for that yet)
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8.0") OR CORRADE_GCC44_COMPATIBILITY)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0") OR CORRADE_GCC44_COMPATIBILITY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
# For GCC 4.5 disable just the strict-aliasing warnings. They are mostly

7
src/Magnum/Framebuffer.cpp

@ -250,6 +250,10 @@ Framebuffer& Framebuffer::attachTextureLayer(Framebuffer::BufferAttachment attac
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4996) /* deprecated warning */
#endif
Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int mipLevel) {
#if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY)
#pragma GCC diagnostic push
@ -261,6 +265,9 @@ Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D
#endif
return *this;
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif
void Framebuffer::renderbufferImplementationDefault(BufferAttachment attachment, Renderbuffer& renderbuffer) {

2
src/Magnum/Implementation/setupDriverWorkarounds.cpp

@ -41,7 +41,7 @@ void Context::setupDriverWorkarounds() {
#ifdef CORRADE_TARGET_WINDOWS
/* On Windows Intel drivers ARB_shading_language_420pack is exposed in GLSL
even that the extension (e.g. binding keyword) is not supported */
if((detectedDriver() & DetectedDriver::IntelWindows) && !Context::current()->isExtensionSupported<Extensions::GL::ARB::shading_language_420pack>())
if((detectedDriver() & DetectedDriver::IntelWindows) && !isExtensionSupported<Extensions::GL::ARB::shading_language_420pack>())
_setRequiredVersion(GL::ARB::shading_language_420pack, None);
#endif

3
src/Magnum/MeshView.h

@ -168,7 +168,8 @@ class MAGNUM_EXPORT MeshView {
* available there.
* @see @ref setCount()
*/
MeshView& setIndexRange(Int first, UnsignedInt start, UnsignedInt end);
/* MinGW/MSVC needs inline also here to avoid linkage conflicts */
inline MeshView& setIndexRange(Int first, UnsignedInt start, UnsignedInt end);
#ifdef MAGNUM_BUILD_DEPRECATED
/**

6
src/Magnum/ResourceManager.hpp

@ -38,7 +38,11 @@
namespace Magnum { namespace Implementation {
template<class ...Types> CORRADE_VISIBILITY_EXPORT ResourceManager<Types...>*& ResourceManagerLocalInstanceImplementation<Types...>::internalInstance() {
template<class ...Types>
#ifndef _MSC_VER
CORRADE_VISIBILITY_EXPORT
#endif
ResourceManager<Types...>*& ResourceManagerLocalInstanceImplementation<Types...>::internalInstance() {
static ResourceManager<Types...>* _instance(nullptr);
return _instance;
}

2
src/Magnum/SceneGraph/AbstractTranslationRotation2D.h

@ -78,7 +78,7 @@ template<class T> class AbstractBasicTranslationRotation2D: public AbstractTrans
* instead.
*/
CORRADE_DEPRECATED("use rotate() or rotateLocal() instead") AbstractBasicTranslationRotation2D<T>& rotate(Math::Rad<T> angle, TransformationType type) {
return type == TransformationType::Global ? rotate(angle, type) : rotateLocal(angle, type);
return type == TransformationType::Global ? rotate(angle) : rotateLocal(angle);
}
#endif

4
src/Magnum/SceneGraph/AbstractTranslationRotation3D.h

@ -202,7 +202,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
* instead.
*/
CORRADE_DEPRECATED("use rotateZ() or rotateZLocal() instead") AbstractBasicTranslationRotation3D<T>& rotateZ(Math::Rad<T> angle, TransformationType type) {
return type == TransformationType::Global ? rotateZ(angle) : rotateZLocal();
return type == TransformationType::Global ? rotateZ(angle) : rotateZLocal(angle);
}
#endif
@ -221,7 +221,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_DEPRECATED("use translate() or translateLocal() instead") AbstractBasicTranslationRotation3D<T>& translate(const Math::Vector2<T>& vector, TransformationType type) {
CORRADE_DEPRECATED("use translate() or translateLocal() instead") AbstractBasicTranslationRotation3D<T>& translate(const Math::Vector3<T>& vector, TransformationType type) {
AbstractTranslation<3, T>::translate(vector, type);
return *this;
}

3
src/Magnum/Shaders/Flat.h

@ -200,7 +200,8 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT Flat: public Abstra
* multiplied with texture if @ref Flag::Textured is set.
* @see @ref setTexture()
*/
Flat<dimensions>& setColor(const Color4& color);
/* MSVC needs inline also here to avoid linkage conflicts */
inline Flat<dimensions>& setColor(const Color4& color);
/**
* @brief Set texture

2
src/MagnumExternal/OpenGL/GL/CMakeLists.txt vendored

@ -26,7 +26,7 @@
# flextGLPlatform.cpp is compiled as part of Magnum*Context libraries in Platform
add_library(MagnumFlextGLObjects OBJECT flextGL.cpp)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang")
set_target_properties(MagnumFlextGLObjects PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -DFlextGL_EXPORTS")
else()
set_target_properties(MagnumFlextGLObjects PROPERTIES COMPILE_FLAGS "-DFlextGL_EXPORTS")

Loading…
Cancel
Save