|
|
|
|
@ -66,9 +66,10 @@ class CubeMapTextureArray: public AbstractTexture {
|
|
|
|
|
/**
|
|
|
|
|
* @copydoc Texture::setWrapping() |
|
|
|
|
*/ |
|
|
|
|
inline void setWrapping(const Math::Vector<3, Wrapping>& wrapping) { |
|
|
|
|
inline CubeMapTextureArray* setWrapping(const Math::Vector<3, Wrapping>& wrapping) { |
|
|
|
|
bind(); |
|
|
|
|
DataHelper<3>::setWrapping(GL_TEXTURE_CUBE_MAP_ARRAY, wrapping); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -78,9 +79,10 @@ class CubeMapTextureArray: public AbstractTexture {
|
|
|
|
|
* for all layers. Each group of 6 2D images is one cube map layer. |
|
|
|
|
* The images are ordered the same way as Coordinate enum. |
|
|
|
|
*/ |
|
|
|
|
template<class T> inline void setData(GLint mipLevel, InternalFormat internalFormat, T* image) { |
|
|
|
|
template<class T> inline CubeMapTextureArray* setData(GLint mipLevel, InternalFormat internalFormat, T* image) { |
|
|
|
|
bind(); |
|
|
|
|
DataHelper<3>::set(GL_TEXTURE_CUBE_MAP_ARRAY, mipLevel, internalFormat, image); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -89,6 +91,7 @@ class CubeMapTextureArray: public AbstractTexture {
|
|
|
|
|
* @param offset Offset where to put data in the texture |
|
|
|
|
* @param image Three-dimensional Image, BufferedImage or for |
|
|
|
|
* example Trade::ImageData |
|
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
|
* |
|
|
|
|
* Sets texture subdata from given image. The image is not deleted |
|
|
|
|
* afterwards. |
|
|
|
|
@ -100,9 +103,10 @@ class CubeMapTextureArray: public AbstractTexture {
|
|
|
|
|
* |
|
|
|
|
* @see setSubData(GLsizei, Coordinate, GLint, const Math::Vector<2, GLint>&, const Image*) |
|
|
|
|
*/ |
|
|
|
|
template<class Image> inline void setSubData(GLint mipLevel, const Math::Vector<3, GLint>& offset, const Image* image) { |
|
|
|
|
template<class Image> inline CubeMapTextureArray* setSubData(GLint mipLevel, const Math::Vector<3, GLint>& offset, const Image* image) { |
|
|
|
|
bind(); |
|
|
|
|
DataHelper<3>::setSub(GL_TEXTURE_CUBE_MAP_ARRAY, mipLevel, offset, image, Math::Vector<3, GLsizei>(Math::Vector<Image::Dimensions, GLsizei>())); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -113,15 +117,17 @@ class CubeMapTextureArray: public AbstractTexture {
|
|
|
|
|
* @param offset Offset where to put data in the texture |
|
|
|
|
* @param image Two-dimensional Image, BufferedImage or for |
|
|
|
|
* example Trade::ImageData |
|
|
|
|
* @return Pointer to self (for method chaining) |
|
|
|
|
* |
|
|
|
|
* Sets texture subdata from given image. The image is not deleted |
|
|
|
|
* afterwards. |
|
|
|
|
* |
|
|
|
|
* @see setSubData(GLint, const Math::Vector<3, GLint>&, const Image*) |
|
|
|
|
*/ |
|
|
|
|
template<class Image> inline void setSubData(GLsizei layer, Coordinate coordinate, GLint mipLevel, const Math::Vector<2, GLint>& offset, const Image* image) { |
|
|
|
|
template<class Image> inline CubeMapTextureArray* setSubData(GLsizei layer, Coordinate coordinate, GLint mipLevel, const Math::Vector<2, GLint>& offset, const Image* image) { |
|
|
|
|
bind(); |
|
|
|
|
DataHelper<3>::setSub(GL_TEXTURE_CUBE_MAP_ARRAY, mipLevel, Math::Vector<3, GLint>(offset, layer*6+static_cast<GLsizei>(coordinate)), image, Math::Vector<2, GLsizei>(Math::Vector<Image::Dimensions, GLsizei>())); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|