@ -154,12 +154,15 @@ void AbstractTexture::unbind(const Int firstTextureUnit, const std::size_t count
Context : : current ( ) . state ( ) . texture . bindMultiImplementation ( firstTextureUnit , { nullptr , count } ) ;
Context : : current ( ) . state ( ) . texture . bindMultiImplementation ( firstTextureUnit , { nullptr , count } ) ;
}
}
/** @todoc const std::initializer_list makes Doxygen grumpy */
void AbstractTexture : : bind ( const Int firstTextureUnit , Containers : : ArrayView < AbstractTexture * const > textures ) {
void AbstractTexture : : bind ( const Int firstTextureUnit , Containers : : ArrayView < AbstractTexture * const > textures ) {
/* State tracker is updated in the implementations */
/* State tracker is updated in the implementations */
Context : : current ( ) . state ( ) . texture . bindMultiImplementation ( firstTextureUnit , { textures . begin ( ) , textures . size ( ) } ) ;
Context : : current ( ) . state ( ) . texture . bindMultiImplementation ( firstTextureUnit , { textures . begin ( ) , textures . size ( ) } ) ;
}
}
void AbstractTexture : : bind ( const Int firstTextureUnit , const std : : initializer_list < AbstractTexture * > textures ) {
bind ( firstTextureUnit , Containers : : arrayView ( textures ) ) ;
}
void AbstractTexture : : bindImplementationFallback ( const GLint firstTextureUnit , const Containers : : ArrayView < AbstractTexture * const > textures ) {
void AbstractTexture : : bindImplementationFallback ( const GLint firstTextureUnit , const Containers : : ArrayView < AbstractTexture * const > textures ) {
for ( std : : size_t i = 0 ; i ! = textures . size ( ) ; + + i )
for ( std : : size_t i = 0 ; i ! = textures . size ( ) ; + + i )
textures & & textures [ i ] ? textures [ i ] - > bind ( firstTextureUnit + i ) : unbind ( firstTextureUnit + i ) ;
textures & & textures [ i ] ? textures [ i ] - > bind ( firstTextureUnit + i ) : unbind ( firstTextureUnit + i ) ;
@ -284,8 +287,11 @@ void AbstractTexture::unbindImage(const Int imageUnit) {
}
}
# ifndef MAGNUM_TARGET_GLES
# ifndef MAGNUM_TARGET_GLES
/** @todoc const Containers::ArrayView makes Doxygen grumpy */
void AbstractTexture : : unbindImages ( const Int firstImageUnit , const std : : size_t count ) {
void AbstractTexture : : bindImages ( const Int firstImageUnit , Containers : : ArrayView < AbstractTexture * const > textures ) {
bindImages ( firstImageUnit , { nullptr , count } ) ;
}
void AbstractTexture : : bindImages ( const Int firstImageUnit , const Containers : : ArrayView < AbstractTexture * const > textures ) {
Implementation : : TextureState & textureState = Context : : current ( ) . state ( ) . texture ;
Implementation : : TextureState & textureState = Context : : current ( ) . state ( ) . texture ;
/* Create array of IDs and also update bindings in state tracker */
/* Create array of IDs and also update bindings in state tracker */
@ -312,6 +318,10 @@ void AbstractTexture::bindImages(const Int firstImageUnit, Containers::ArrayView
/* Avoid doing the binding if there is nothing different */
/* Avoid doing the binding if there is nothing different */
if ( different ) glBindImageTextures ( firstImageUnit , textures . size ( ) , ids ) ;
if ( different ) glBindImageTextures ( firstImageUnit , textures . size ( ) , ids ) ;
}
}
void AbstractTexture : : bindImages ( const Int firstImageUnit , const std : : initializer_list < AbstractTexture * > textures ) {
bindImages ( firstImageUnit , Containers : : arrayView ( textures ) ) ;
}
# endif
# endif
void AbstractTexture : : bindImageInternal ( const Int imageUnit , const Int level , const bool layered , const Int layer , const ImageAccess access , const ImageFormat format ) {
void AbstractTexture : : bindImageInternal ( const Int imageUnit , const Int level , const bool layered , const Int layer , const ImageAccess access , const ImageFormat format ) {