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/TransformFeedbackState.h
  5. 2
      src/Magnum/Implementation/setupDriverWorkarounds.cpp
  6. 3
      src/Magnum/MeshView.h
  7. 6
      src/Magnum/ResourceManager.hpp
  8. 2
      src/Magnum/SceneGraph/AbstractTranslationRotation2D.h
  9. 4
      src/Magnum/SceneGraph/AbstractTranslationRotation3D.h
  10. 3
      src/Magnum/Shaders/Flat.h
  11. 2
      src/MagnumExternal/OpenGL/GL/CMakeLists.txt

4
package/archlinux/PKGBUILD-gcc47

@ -14,6 +14,10 @@ provides=('magnum-git')
_rootdir=$startdir/../../ _rootdir=$startdir/../../
build() { 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 if [ ! -d "$_rootdir/build-gcc47" ] ; then
mkdir "$_rootdir/build-gcc47" mkdir "$_rootdir/build-gcc47"
cd "$_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() # 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) # 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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
# For GCC 4.5 disable just the strict-aliasing warnings. They are mostly # 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 #endif
#ifdef MAGNUM_BUILD_DEPRECATED #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) { Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int mipLevel) {
#if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY) #if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY)
#pragma GCC diagnostic push #pragma GCC diagnostic push
@ -261,6 +265,9 @@ Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D
#endif #endif
return *this; return *this;
} }
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif #endif
void Framebuffer::renderbufferImplementationDefault(BufferAttachment attachment, Renderbuffer& renderbuffer) { void Framebuffer::renderbufferImplementationDefault(BufferAttachment attachment, Renderbuffer& renderbuffer) {

2
src/Magnum/Implementation/TransformFeedbackState.h

@ -47,7 +47,7 @@ struct TransformFeedbackState {
GLint maxBuffers; GLint maxBuffers;
#endif #endif
GLuint binding; GLuint binding;
void(TransformFeedback::*createImplementation)(); void(TransformFeedback::*createImplementation)();
void(TransformFeedback::*attachRangeImplementation)(GLuint, Buffer&, GLintptr, GLsizeiptr); void(TransformFeedback::*attachRangeImplementation)(GLuint, Buffer&, GLintptr, GLsizeiptr);

2
src/Magnum/Implementation/setupDriverWorkarounds.cpp

@ -41,7 +41,7 @@ void Context::setupDriverWorkarounds() {
#ifdef CORRADE_TARGET_WINDOWS #ifdef CORRADE_TARGET_WINDOWS
/* On Windows Intel drivers ARB_shading_language_420pack is exposed in GLSL /* On Windows Intel drivers ARB_shading_language_420pack is exposed in GLSL
even that the extension (e.g. binding keyword) is not supported */ 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); _setRequiredVersion(GL::ARB::shading_language_420pack, None);
#endif #endif

3
src/Magnum/MeshView.h

@ -168,7 +168,8 @@ class MAGNUM_EXPORT MeshView {
* available there. * available there.
* @see @ref setCount() * @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 #ifdef MAGNUM_BUILD_DEPRECATED
/** /**

6
src/Magnum/ResourceManager.hpp

@ -38,7 +38,11 @@
namespace Magnum { namespace Implementation { 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); static ResourceManager<Types...>* _instance(nullptr);
return _instance; return _instance;
} }

2
src/Magnum/SceneGraph/AbstractTranslationRotation2D.h

@ -78,7 +78,7 @@ template<class T> class AbstractBasicTranslationRotation2D: public AbstractTrans
* instead. * instead.
*/ */
CORRADE_DEPRECATED("use rotate() or rotateLocal() instead") AbstractBasicTranslationRotation2D<T>& rotate(Math::Rad<T> angle, TransformationType type) { 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 #endif

4
src/Magnum/SceneGraph/AbstractTranslationRotation3D.h

@ -202,7 +202,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
* instead. * instead.
*/ */
CORRADE_DEPRECATED("use rotateZ() or rotateZLocal() instead") AbstractBasicTranslationRotation3D<T>& rotateZ(Math::Rad<T> angle, TransformationType type) { 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 #endif
@ -221,7 +221,7 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractTrans
return *this; return *this;
} }
#ifdef MAGNUM_BUILD_DEPRECATED #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); AbstractTranslation<3, T>::translate(vector, type);
return *this; 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. * multiplied with texture if @ref Flag::Textured is set.
* @see @ref setTexture() * @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 * @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 # flextGLPlatform.cpp is compiled as part of Magnum*Context libraries in Platform
add_library(MagnumFlextGLObjects OBJECT flextGL.cpp) 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") set_target_properties(MagnumFlextGLObjects PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -DFlextGL_EXPORTS")
else() else()
set_target_properties(MagnumFlextGLObjects PROPERTIES COMPILE_FLAGS "-DFlextGL_EXPORTS") set_target_properties(MagnumFlextGLObjects PROPERTIES COMPILE_FLAGS "-DFlextGL_EXPORTS")

Loading…
Cancel
Save