Browse Source

Disable deprecated API if MAGNUM_BUILD_DEPRECATED is set.

Causes the compilation to fail.
pull/23/head
Vladimír Vondruš 13 years ago
parent
commit
bddf01c3b9
  1. 2
      src/AbstractShaderProgram.h
  2. 2
      src/AbstractTexture.h
  3. 4
      src/Buffer.h
  4. 7
      src/CMakeLists.txt
  5. 4
      src/ImageFormat.h
  6. 2
      src/Platform/AbstractXApplication.h
  7. 2
      src/Platform/NaClApplication.h
  8. 2
      src/Sampler.h

2
src/AbstractShaderProgram.h

@ -309,12 +309,14 @@ class MAGNUM_EXPORT AbstractShaderProgram {
*/
static Int maxVertexAttributes();
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copydoc maxVertexAttributes()
* @deprecated Use @ref Magnum::AbstractShaderProgram::maxVertexAttributes() "maxVertexAttributes()"
* instead.
*/
static Int maxSupportedVertexAttributeCount() { return maxVertexAttributes(); }
#endif
#ifndef MAGNUM_TARGET_GLES
/**

2
src/AbstractTexture.h

@ -110,12 +110,14 @@ class MAGNUM_EXPORT AbstractTexture {
*/
static Int maxLayers();
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief maxLayers()
* @deprecated Use @ref Magnum::AbstractTexture::maxLayers() "maxLayers()"
* instead.
*/
static Int maxSupportedLayerCount() { return maxLayers(); }
#endif
#ifndef MAGNUM_TARGET_GLES
/**

4
src/Buffer.h

@ -657,6 +657,7 @@ class MAGNUM_EXPORT Buffer {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Set buffer data
* @deprecated Use @ref Magnum::Buffer::setData(Containers::ArrayReference<const void>, Usage) "setData(Containers::ArrayReference<const void>, Usage)"
@ -665,6 +666,7 @@ class MAGNUM_EXPORT Buffer {
Buffer& setData(GLsizeiptr size, const GLvoid* data, Usage usage) {
return setData({data, std::size_t(size)}, usage);
}
#endif
/**
* @brief Set buffer data
@ -702,6 +704,7 @@ class MAGNUM_EXPORT Buffer {
return *this;
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Set buffer subdata
* @deprecated Use @ref Magnum::Buffer::setSubData(GLintptr, Containers::ArrayReference<const void>) "setSubData(GLintptr, Containers::ArrayReference<const void>)"
@ -710,6 +713,7 @@ class MAGNUM_EXPORT Buffer {
Buffer& setSubData(GLintptr offset, GLsizeiptr size, const GLvoid* data) {
return setSubData(offset, {data, std::size_t(size)});
}
#endif
/**
* @brief Set buffer subdata

7
src/CMakeLists.txt

@ -116,7 +116,6 @@ set(Magnum_HEADERS
Extensions.h
Framebuffer.h
Image.h
ImageFormat.h
ImageReference.h
Magnum.h
Mesh.h
@ -138,6 +137,12 @@ set(Magnum_HEADERS
magnumVisibility.h)
# Deprecated headers
if(BUILD_DEPRECATED)
set(Magnum_HEADERS ${Magnum_HEADERS}
ImageFormat.h)
endif()
# Desktop-only headers and libraries
if(NOT TARGET_GLES)
set(Magnum_HEADERS ${Magnum_HEADERS}

4
src/ImageFormat.h

@ -31,6 +31,7 @@
#include "ColorFormat.h"
#ifdef MAGNUM_BUILD_DEPRECATED
namespace Magnum {
/**
@ -46,5 +47,8 @@ typedef ColorFormat ImageFormat;
typedef ColorType ImageType;
}
#else
#error
#endif
#endif

2
src/Platform/AbstractXApplication.h

@ -257,6 +257,7 @@ class AbstractXApplication::InputEvent {
Alt = Mod1Mask, /**< Alt */
AltGr = Mod5Mask, /**< AltGr */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief Button::Left
* @deprecated Use @ref Magnum::Platform::AbstractXApplication::InputEvent::buttons() "buttons()"
@ -280,6 +281,7 @@ class AbstractXApplication::InputEvent {
* instead.
*/
RightButton = Button3Mask,
#endif
CapsLock = LockMask, /**< Caps lock */
NumLock = Mod2Mask /**< Num lock */

2
src/Platform/NaClApplication.h

@ -371,6 +371,7 @@ class NaClApplication::InputEvent {
Alt = PP_INPUTEVENT_MODIFIER_ALTKEY, /**< Alt */
Meta = PP_INPUTEVENT_MODIFIER_METAKEY, /**< Meta */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief Button::Left
* @deprecated Use @ref Magnum::Platform::NaClApplication::InputEvent::buttons() "buttons()"
@ -394,6 +395,7 @@ class NaClApplication::InputEvent {
* instead.
*/
RightButton = PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN,
#endif
CapsLock = PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY, /**< Caps lock */
NumLock = PP_INPUTEVENT_MODIFIER_NUMLOCKKEY /**< Num lock */

2
src/Sampler.h

@ -146,6 +146,7 @@ class MAGNUM_EXPORT Sampler {
*/
static Float maxAnisotropy();
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief maxAnisotropy()
* @deprecated Use @ref Magnum::Sampler::maxAnisotropy() "maxAnisotropy()"
@ -153,6 +154,7 @@ class MAGNUM_EXPORT Sampler {
*/
static Float maxSupportedAnisotropy() { return maxAnisotropy(); }
#endif
#endif
};
/** @debugoperator{Magnum::Sampler} */

Loading…
Cancel
Save