Browse Source

GL: TextureFormat::R3B3G2 had a typo in the name.

Use R3G3B2 instead. The íold name is preserved for compatibility, but
marked as deprecated and scheduled for removal in a future release.
findsdl-include-root
Vladimír Vondruš 7 years ago
parent
commit
b5371f7a6b
  1. 2
      doc/changelog.dox
  2. 4
      src/Magnum/GL/AbstractTexture.cpp
  3. 10
      src/Magnum/GL/TextureFormat.h

2
doc/changelog.dox

@ -657,6 +657,8 @@ See also:
@ref Corrade::Containers::ArrayView. This header is included automatically
when @ref MAGNUM_BUILD_DEPRECATED is enabled, include it explicitly to stay
forward compatible.
- @cpp GL::TextureFormat::R3B3G2 @ce had a misleading typo in the name, use
@ref GL::TextureFormat::R3G3B2 instead.
- @cpp Magnum/MeshTools/GenerateFlatNormals.h @ce is deprecated, use
@cpp Magnum/MeshTools/GenerateNormals.h @ce instead
- @cpp MeshTools::generateFlatNormals(const std::vector<UnsignedInt>&, const std::vector<Vector3>&) @ce

4
src/Magnum/GL/AbstractTexture.cpp

@ -660,7 +660,7 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
case TextureFormat::RGB32F:
#endif
#ifndef MAGNUM_TARGET_GLES
case TextureFormat::R3B3G2:
case TextureFormat::R3G3B2:
case TextureFormat::RGB4:
case TextureFormat::RGB5:
#endif
@ -1091,7 +1091,7 @@ PixelType pixelTypeForInternalFormat(const TextureFormat internalFormat) {
#endif
#ifndef MAGNUM_TARGET_GLES
case TextureFormat::R3B3G2:
case TextureFormat::R3G3B2:
return PixelType::UnsignedByte332;
case TextureFormat::RGB4:
return PixelType::UnsignedShort4444;

10
src/Magnum/GL/TextureFormat.h

@ -797,7 +797,15 @@ enum class TextureFormat: GLenum {
* RGB, normalized unsigned, red and green component 3bit, blue 2bit.
* @requires_gl Packed 8bit types are not available in OpenGL ES or WebGL.
*/
R3B3G2 = GL_R3_G3_B2,
R3G3B2 = GL_R3_G3_B2,
#ifdef MAGNUM_BUILD_DEPRECATED
/** RGB, normalized unsigned, red and green component 3bit, blue 2bit.
* @deprecated This one had a misleading typo in the name, use
* @ref TextureFormat::R3G3B2 instead.
*/
R3B3G2 CORRADE_DEPRECATED_ENUM("use R3G3B2 instead") = R3G3B2,
#endif
/**
* RGB, each component normalized unsigned 4bit.

Loading…
Cancel
Save