@ -31,10 +31,10 @@
# include "Magnum/BufferImage.h"
# endif
# include "Magnum/Array.h"
# include "Magnum/ColorFormat.h"
# include "Magnum/Context.h"
# include "Magnum/Extensions.h"
# include "Magnum/Image.h"
# include "Magnum/PixelFormat.h"
# include "Magnum/TextureFormat.h"
# include "Magnum/Math/Color.h"
# include "Magnum/Math/Range.h"
@ -471,7 +471,7 @@ void AbstractTexture::bindInternal() {
}
# if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
Color Format AbstractTexture : : imageFormatForInternalFormat ( const TextureFormat internalFormat ) {
Pixel Format AbstractTexture : : imageFormatForInternalFormat ( const TextureFormat internalFormat ) {
switch ( internalFormat ) {
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
case TextureFormat : : Red :
@ -496,7 +496,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : CompressedR11Eac :
case TextureFormat : : CompressedSignedR11Eac :
# endif
return Color Format: : Red ;
return Pixel Format: : Red ;
# endif
# ifndef MAGNUM_TARGET_GLES2
@ -506,7 +506,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : R16I :
case TextureFormat : : R32UI :
case TextureFormat : : R32I :
return Color Format: : RedInteger ;
return Pixel Format: : RedInteger ;
# endif
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
@ -532,7 +532,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : CompressedRG11Eac :
case TextureFormat : : CompressedSignedRG11Eac :
# endif
return Color Format: : RG ;
return Pixel Format: : RG ;
# endif
# ifndef MAGNUM_TARGET_GLES2
@ -542,7 +542,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : RG16I :
case TextureFormat : : RG32UI :
case TextureFormat : : RG32I :
return Color Format: : RGInteger ;
return Pixel Format: : RGInteger ;
# endif
case TextureFormat : : RGB :
@ -592,7 +592,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : CompressedSRGB8Etc2 :
# endif
case TextureFormat : : CompressedRGBS3tcDxt1 :
return Color Format: : RGB ;
return Pixel Format: : RGB ;
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : RGB8UI :
@ -601,7 +601,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : RGB16I :
case TextureFormat : : RGB32UI :
case TextureFormat : : RGB32I :
return Color Format: : RGBInteger ;
return Pixel Format: : RGBInteger ;
# endif
case TextureFormat : : RGBA :
@ -680,7 +680,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : CompressedRGBAAstc12x12 :
case TextureFormat : : CompressedSRGB8Alpha8Astc12x12 :
# endif
return Color Format: : RGBA ;
return Pixel Format: : RGBA ;
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : RGBA8UI :
@ -690,14 +690,14 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat : : RGBA32UI :
case TextureFormat : : RGBA32I :
case TextureFormat : : RGB10A2UI :
return Color Format: : RGBAInteger ;
return Pixel Format: : RGBAInteger ;
# endif
# ifdef MAGNUM_TARGET_GLES2
case TextureFormat : : Luminance :
return Color Format: : Luminance ;
return Pixel Format: : Luminance ;
case TextureFormat : : LuminanceAlpha :
return Color Format: : LuminanceAlpha ;
return Pixel Format: : LuminanceAlpha ;
# endif
case TextureFormat : : DepthComponent :
@ -711,11 +711,11 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : DepthComponent32F :
# endif
return Color Format: : DepthComponent ;
return Pixel Format: : DepthComponent ;
# ifndef MAGNUM_TARGET_WEBGL
case TextureFormat : : StencilIndex8 :
return Color Format: : StencilIndex ;
return Pixel Format: : StencilIndex ;
# endif
case TextureFormat : : DepthStencil :
@ -725,13 +725,13 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : Depth32FStencil8 :
# endif
return Color Format: : DepthStencil ;
return Pixel Format: : DepthStencil ;
}
CORRADE_ASSERT_UNREACHABLE ( ) ;
}
Color Type AbstractTexture : : imageTypeForInternalFormat ( const TextureFormat internalFormat ) {
Pixel Type AbstractTexture : : imageTypeForInternalFormat ( const TextureFormat internalFormat ) {
switch ( internalFormat ) {
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
case TextureFormat : : Red :
@ -820,7 +820,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat : : CompressedRGBAAstc12x12 :
case TextureFormat : : CompressedSRGB8Alpha8Astc12x12 :
# endif
return Color Type: : UnsignedByte ;
return Pixel Type: : UnsignedByte ;
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : R8Snorm :
@ -835,7 +835,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat : : CompressedSignedRedRgtc1 :
case TextureFormat : : CompressedSignedRGRgtc2 :
# endif
return Color Type: : Byte ;
return Pixel Type: : Byte ;
# endif
# ifndef MAGNUM_TARGET_GLES
@ -857,7 +857,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
# ifndef MAGNUM_TARGET_GLES
case TextureFormat : : RGBA12 : /**< @todo really? */
# endif
return Color Type: : UnsignedShort ;
return Pixel Type: : UnsignedShort ;
# ifndef MAGNUM_TARGET_GLES2
# ifndef MAGNUM_TARGET_GLES
@ -870,7 +870,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat : : RG16I :
case TextureFormat : : RGB16I :
case TextureFormat : : RGBA16I :
return Color Type: : Short ;
return Pixel Type: : Short ;
# endif
# ifndef MAGNUM_TARGET_GLES2
@ -878,19 +878,19 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat : : RG16F :
case TextureFormat : : RGB16F :
case TextureFormat : : RGBA16F :
return Color Type: : HalfFloat ;
return Pixel Type: : HalfFloat ;
case TextureFormat : : R32UI :
case TextureFormat : : RG32UI :
case TextureFormat : : RGB32UI :
case TextureFormat : : RGBA32UI :
return Color Type: : UnsignedInt ;
return Pixel Type: : UnsignedInt ;
case TextureFormat : : R32I :
case TextureFormat : : RG32I :
case TextureFormat : : RGB32I :
case TextureFormat : : RGBA32I :
return Color Type: : Int ;
return Pixel Type: : Int ;
case TextureFormat : : R32F :
case TextureFormat : : RG32F :
@ -900,24 +900,24 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat : : CompressedRGBBptcUnsignedFloat :
case TextureFormat : : CompressedRGBBptcSignedFloat :
# endif
return Color Type: : Float ;
return Pixel Type: : Float ;
# endif
# ifndef MAGNUM_TARGET_GLES
case TextureFormat : : R3B3G2 :
return Color Type: : UnsignedByte332 ;
return Pixel Type: : UnsignedByte332 ;
case TextureFormat : : RGB4 :
return Color Type: : UnsignedShort4444 ;
return Pixel Type: : UnsignedShort4444 ;
# endif
# ifndef MAGNUM_TARGET_GLES
case TextureFormat : : RGB5 :
# endif
case TextureFormat : : RGB5A1 :
return Color Type: : UnsignedShort5551 ;
return Pixel Type: : UnsignedShort5551 ;
case TextureFormat : : RGB565 :
return Color Type: : UnsignedShort565 ;
return Pixel Type: : UnsignedShort565 ;
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
# if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
@ -927,19 +927,19 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : RGB10A2UI :
# endif
return Color Type: : UnsignedInt2101010Rev ; /**< @todo Rev for all? */
return Pixel Type: : UnsignedInt2101010Rev ; /**< @todo Rev for all? */
# endif
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : R11FG11FB10F :
return Color Type: : UnsignedInt10F11F11FRev ;
return Pixel Type: : UnsignedInt10F11F11FRev ;
case TextureFormat : : RGB9E5 :
return Color Type: : UnsignedInt5999Rev ;
return Pixel Type: : UnsignedInt5999Rev ;
# endif
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
case TextureFormat : : DepthComponent16 :
return Color Type: : UnsignedShort ;
return Pixel Type: : UnsignedShort ;
# endif
case TextureFormat : : DepthComponent :
@ -949,27 +949,27 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
# ifndef MAGNUM_TARGET_WEBGL
case TextureFormat : : DepthComponent32 :
# endif
return Color Type: : UnsignedInt ;
return Pixel Type: : UnsignedInt ;
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : DepthComponent32F :
return Color Type: : Float ;
return Pixel Type: : Float ;
# endif
# ifndef MAGNUM_TARGET_WEBGL
case TextureFormat : : StencilIndex8 :
return Color Type: : UnsignedByte ;
return Pixel Type: : UnsignedByte ;
# endif
case TextureFormat : : DepthStencil :
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
case TextureFormat : : Depth24Stencil8 :
# endif
return Color Type: : UnsignedInt248 ;
return Pixel Type: : UnsignedInt248 ;
# ifndef MAGNUM_TARGET_GLES2
case TextureFormat : : Depth32FStencil8 :
return Color Type: : Float32UnsignedInt248Rev ;
return Pixel Type: : Float32UnsignedInt248Rev ;
# endif
}
@ -1113,8 +1113,8 @@ void AbstractTexture::getLevelParameterImplementationDSAEXT(GLint level, GLenum
# ifndef MAGNUM_TARGET_GLES
void AbstractTexture : : storageImplementationFallback ( const GLsizei levels , const TextureFormat internalFormat , const Math : : Vector < 1 , GLsizei > & size ) {
const Color Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Color Type type = imageTypeForInternalFormat ( internalFormat ) ;
const Pixel Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Pixel Type type = imageTypeForInternalFormat ( internalFormat ) ;
for ( GLsizei level = 0 ; level ! = levels ; + + level )
DataHelper < 1 > : : setImage ( * this , level , internalFormat ,
@ -1138,8 +1138,8 @@ void AbstractTexture::storageImplementationDSAEXT(GLsizei levels, TextureFormat
# if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2)
void AbstractTexture : : storageImplementationFallback ( const GLsizei levels , const TextureFormat internalFormat , const Vector2i & size ) {
const Color Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Color Type type = imageTypeForInternalFormat ( internalFormat ) ;
const Pixel Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Pixel Type type = imageTypeForInternalFormat ( internalFormat ) ;
/* Common code for classic types */
# ifndef MAGNUM_TARGET_GLES
@ -1207,8 +1207,8 @@ void AbstractTexture::storageImplementationDSAEXT(GLsizei levels, TextureFormat
# if !defined(MAGNUM_TARGET_GLES) || (defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL))
void AbstractTexture : : storageImplementationFallback ( GLsizei levels , TextureFormat internalFormat , const Vector3i & size ) {
const Color Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Color Type type = imageTypeForInternalFormat ( internalFormat ) ;
const Pixel Format format = imageFormatForInternalFormat ( internalFormat ) ;
const Pixel Type type = imageTypeForInternalFormat ( internalFormat ) ;
/* Common code for classic type */
# ifndef MAGNUM_TARGET_GLES2
@ -1318,7 +1318,7 @@ void AbstractTexture::storageMultisampleImplementationDSAEXT(const GLsizei sampl
# endif
# ifndef MAGNUM_TARGET_GLES
void AbstractTexture : : getImageImplementationDefault ( const GLint level , const Color Format format , const Color Type type , const std : : size_t , GLvoid * const data ) {
void AbstractTexture : : getImageImplementationDefault ( const GLint level , const Pixel Format format , const Pixel Type type , const std : : size_t , GLvoid * const data ) {
bindInternal ( ) ;
glGetTexImage ( _target , level , GLenum ( format ) , GLenum ( type ) , data ) ;
}
@ -1328,7 +1328,7 @@ void AbstractTexture::getCompressedImageImplementationDefault(const GLint level,
glGetCompressedTexImage ( _target , level , data ) ;
}
void AbstractTexture : : getImageImplementationDSA ( const GLint level , const Color Format format , const Color Type type , const std : : size_t dataSize , GLvoid * const data ) {
void AbstractTexture : : getImageImplementationDSA ( const GLint level , const Pixel Format format , const Pixel Type type , const std : : size_t dataSize , GLvoid * const data ) {
glGetTextureImage ( _id , level , GLenum ( format ) , GLenum ( type ) , dataSize , data ) ;
}
@ -1336,7 +1336,7 @@ void AbstractTexture::getCompressedImageImplementationDSA(const GLint level, con
glGetCompressedTextureImage ( _id , level , dataSize , data ) ;
}
void AbstractTexture : : getImageImplementationDSAEXT ( const GLint level , const Color Format format , const Color Type type , const std : : size_t , GLvoid * const data ) {
void AbstractTexture : : getImageImplementationDSAEXT ( const GLint level , const Pixel Format format , const Pixel Type type , const std : : size_t , GLvoid * const data ) {
_flags | = ObjectFlag : : Created ;
glGetTextureImageEXT ( _id , _target , level , GLenum ( format ) , GLenum ( type ) , data ) ;
}
@ -1346,7 +1346,7 @@ void AbstractTexture::getCompressedImageImplementationDSAEXT(const GLint level,
glGetCompressedTextureImageEXT ( _id , _target , level , data ) ;
}
void AbstractTexture : : getImageImplementationRobustness ( const GLint level , const Color Format format , const Color Type type , const std : : size_t dataSize , GLvoid * const data ) {
void AbstractTexture : : getImageImplementationRobustness ( const GLint level , const Pixel Format format , const Pixel Type type , const std : : size_t dataSize , GLvoid * const data ) {
bindInternal ( ) ;
glGetnTexImageARB ( _target , level , GLenum ( format ) , GLenum ( type ) , dataSize , data ) ;
}
@ -1358,67 +1358,67 @@ void AbstractTexture::getCompressedImageImplementationRobustness(const GLint lev
# endif
# ifndef MAGNUM_TARGET_GLES
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
bindInternal ( ) ;
glTexSubImage1D ( _target , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
bindInternal ( ) ;
glCompressedTexSubImage1D ( _target , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , data . size ( ) , data ) ;
}
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const Color Format format , const Color Type type , const GLvoid * const data ) {
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const Pixel Format format , const Pixel Type type , const GLvoid * const data ) {
glTextureSubImage1D ( _id , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
glCompressedTextureSubImage1D ( _id , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , data . size ( ) , data ) ;
}
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
_flags | = ObjectFlag : : Created ;
glTextureSubImage1DEXT ( _id , _target , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( const GLint level , const Math : : Vector < 1 , GLint > & offset , const Math : : Vector < 1 , GLsizei > & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
_flags | = ObjectFlag : : Created ;
glCompressedTextureSubImage1DEXT ( _id , _target , level , offset [ 0 ] , size [ 0 ] , GLenum ( format ) , data . size ( ) , data ) ;
}
# endif
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Vector2i & offset , const Vector2i & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Vector2i & offset , const Vector2i & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
bindInternal ( ) ;
glTexSubImage2D ( _target , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Vector2i & offset , const Vector2i & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Vector2i & offset , const Vector2i & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
bindInternal ( ) ;
glCompressedTexSubImage2D ( _target , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , data . size ( ) , data ) ;
}
# ifndef MAGNUM_TARGET_GLES
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Vector2i & offset , const Vector2i & size , const Color Format format , const Color Type type , const GLvoid * const data ) {
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Vector2i & offset , const Vector2i & size , const Pixel Format format , const Pixel Type type , const GLvoid * const data ) {
glTextureSubImage2D ( _id , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Vector2i & offset , const Vector2i & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Vector2i & offset , const Vector2i & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
glCompressedTextureSubImage2D ( _id , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , data . size ( ) , data ) ;
}
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Vector2i & offset , const Vector2i & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Vector2i & offset , const Vector2i & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
_flags | = ObjectFlag : : Created ;
glTextureSubImage2DEXT ( _id , _target , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( GLint level , const Vector2i & offset , const Vector2i & size , CompressedColor Format format , Corrade : : Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( GLint level , const Vector2i & offset , const Vector2i & size , CompressedPixel Format format , Corrade : : Containers : : ArrayView < const GLvoid > data ) {
_flags | = ObjectFlag : : Created ;
glCompressedTextureSubImage2DEXT ( _id , _target , level , offset . x ( ) , offset . y ( ) , size . x ( ) , size . y ( ) , GLenum ( format ) , data . size ( ) , data ) ;
}
# endif
# if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Vector3i & offset , const Vector3i & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDefault ( GLint level , const Vector3i & offset , const Vector3i & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
bindInternal ( ) ;
# ifndef MAGNUM_TARGET_GLES2
glTexSubImage3D ( _target , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
@ -1435,7 +1435,7 @@ void AbstractTexture::subImageImplementationDefault(GLint level, const Vector3i&
# endif
}
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDefault ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
bindInternal ( ) ;
# ifndef MAGNUM_TARGET_GLES2
glCompressedTexSubImage3D ( _target , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , data . size ( ) , data ) ;
@ -1453,20 +1453,20 @@ void AbstractTexture::compressedSubImageImplementationDefault(const GLint level,
# endif
# ifndef MAGNUM_TARGET_GLES
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Vector3i & offset , const Vector3i & size , const Color Format format , const Color Type type , const GLvoid * const data ) {
void AbstractTexture : : subImageImplementationDSA ( const GLint level , const Vector3i & offset , const Vector3i & size , const Pixel Format format , const Pixel Type type , const GLvoid * const data ) {
glTextureSubImage3D ( _id , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSA ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
glCompressedTextureSubImage3D ( _id , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , data . size ( ) , data ) ;
}
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Vector3i & offset , const Vector3i & size , ColorFormat format , Color Type type , const GLvoid * data ) {
void AbstractTexture : : subImageImplementationDSAEXT ( GLint level , const Vector3i & offset , const Vector3i & size , PixelFormat format , Pixel Type type , const GLvoid * data ) {
_flags | = ObjectFlag : : Created ;
glTextureSubImage3DEXT ( _id , _target , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , GLenum ( type ) , data ) ;
}
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedColor Format format , const Containers : : ArrayView < const GLvoid > data ) {
void AbstractTexture : : compressedSubImageImplementationDSAEXT ( const GLint level , const Vector3i & offset , const Vector3i & size , const CompressedPixel Format format , const Containers : : ArrayView < const GLvoid > data ) {
_flags | = ObjectFlag : : Created ;
glCompressedTextureSubImage3DEXT ( _id , _target , level , offset . x ( ) , offset . y ( ) , offset . z ( ) , size . x ( ) , size . y ( ) , size . z ( ) , GLenum ( format ) , data . size ( ) , data ) ;
}
@ -1530,7 +1530,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedImage(const GLi
Buffer : : unbindInternal ( Buffer : : TargetHint : : PixelPack ) ;
( this - > * Context : : current ( ) - > state ( ) . texture - > getCompressedImageImplementation ) ( level , dataSize , data ) ;
image . setData ( CompressedColor Format ( format ) , size , std : : move ( data ) ) ;
image . setData ( CompressedPixel Format ( format ) , size , std : : move ( data ) ) ;
}
template void MAGNUM_EXPORT AbstractTexture : : compressedImage < 1 > ( GLint , CompressedImage < 1 > & ) ;
@ -1544,7 +1544,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedImage(const GLi
GLint format ;
( this - > * Context : : current ( ) - > state ( ) . texture - > getLevelParameterivImplementation ) ( level , GL_TEXTURE_INTERNAL_FORMAT , & format ) ;
image . setData ( CompressedColor Format ( format ) , size , { nullptr , std : : size_t ( dataSize ) } , usage ) ;
image . setData ( CompressedPixel Format ( format ) , size , { nullptr , std : : size_t ( dataSize ) } , usage ) ;
image . buffer ( ) . bindInternal ( Buffer : : TargetHint : : PixelPack ) ;
( this - > * Context : : current ( ) - > state ( ) . texture - > getCompressedImageImplementation ) ( level , dataSize , nullptr ) ;
}