Antkeeper  0.0.1
Public Member Functions | Protected Member Functions | Friends | List of all members
gl::image_view Class Referenceabstract

Image view. More...

#include <image-view.hpp>

Inheritance diagram for gl::image_view:
gl::image_view_1d gl::image_view_1d_array gl::image_view_2d gl::image_view_2d_array gl::image_view_3d gl::image_view_cube gl::image_view_cube_array

Public Member Functions

virtual ~image_view ()=0
 Destructs an image view. More...
 
 image_view (const image_view &)=delete
 
 image_view (image_view &&)=delete
 
image_viewoperator= (const image_view &)=delete
 
image_viewoperator= (image_view &&)=delete
 
constexpr const std::shared_ptr< image > & get_image () const noexcept
 Returns the image on which the view was created. More...
 
constexpr format get_format () const noexcept
 Returns the format and type used to interpret texel blocks of the image. More...
 
constexpr std::uint32_t get_first_mip_level () const noexcept
 Returns the first mipmap level accessible to the view. More...
 
constexpr std::uint32_t get_mip_level_count () const noexcept
 Returns the number of mipmap levels accessible to the view. More...
 
constexpr std::uint32_t get_first_array_layer () const noexcept
 Returns the first array layer accessible to the view. More...
 
constexpr std::uint32_t get_array_layer_count () const noexcept
 Returns the number of array layers accessible to the view. More...
 
constexpr std::uint8_t get_dimensionality () const noexcept
 Returns the dimensionality of the image view. More...
 
constexpr bool is_1d () const noexcept
 Returns true if the image view is 1D, false otherwise. More...
 
constexpr bool is_2d () const noexcept
 Returns true if the image view is 2D, false otherwise. More...
 
constexpr bool is_3d () const noexcept
 Returns true if the image view is 3D, false otherwise. More...
 
constexpr bool is_array () const noexcept
 Returns true if the image view is an array view, false otherwise. More...
 
constexpr bool is_cube () const noexcept
 Returns true if the image view is a cube map view, false otherwise. More...
 

Protected Member Functions

 image_view (std::shared_ptr< gl::image > image, std::uint8_t dimensionality, gl::format format, std::uint32_t first_mip_level, std::uint32_t mip_level_count, std::uint32_t first_array_layer, std::uint32_t array_layer_count, std::uint8_t flags)
 Constructs an image view from an image. More...
 

Friends

class framebuffer
 
class gl_shader_texture_1d
 
class gl_shader_texture_2d
 
class gl_shader_texture_3d
 
class gl_shader_texture_cube
 

Detailed Description

Image view.

Definition at line 33 of file image-view.hpp.

Constructor & Destructor Documentation

◆ ~image_view()

gl::image_view::~image_view ( )
pure virtual

Destructs an image view.

Definition at line 144 of file image-view.cpp.

◆ image_view() [1/3]

gl::image_view::image_view ( const image_view )
delete

◆ image_view() [2/3]

gl::image_view::image_view ( image_view &&  )
delete

◆ image_view() [3/3]

gl::image_view::image_view ( std::shared_ptr< gl::image image,
std::uint8_t  dimensionality,
gl::format  format,
std::uint32_t  first_mip_level,
std::uint32_t  mip_level_count,
std::uint32_t  first_array_layer,
std::uint32_t  array_layer_count,
std::uint8_t  flags 
)
protected

Constructs an image view from an image.

Parameters
imageImage on which the view will be created.
dimensionalityImage view dimensionality, on [1, 3].
formatFormat and type used to interpret texel blocks of the image. If gl::format::undefined, the format will be set to the format of the image.
first_mip_levelFirst mipmap level accessible to the view.
mip_level_countNumber of mipmap levels accessible to the view.
first_array_layerFirst array layer accessible to the view.
array_layerNumber of array layers accessible to the view.
flagsImage view flags.

@except std::invalid_argument Image view has null image. @except std::invalid_argument Image view has unsupported format. @except std::invalid_argument Image view has zero mip levels. @except std::out_of_range Image view mip range out of image mip range. @except std::invalid_argument Image view has zero array layers. @except std::out_of_range Image view array layer range out of image array layer range. @except std::invalid_argument Image view dimensionality must match image dimensionality. @except std::invalid_argument Cube image views must be constructed from cube-compatible images. @except std::invalid_argument Cube image views array layer count must be a multiple of 6.

Definition at line 27 of file image-view.cpp.

Member Function Documentation

◆ get_array_layer_count()

constexpr std::uint32_t gl::image_view::get_array_layer_count ( ) const
inlineconstexprnoexcept

Returns the number of array layers accessible to the view.

Definition at line 75 of file image-view.hpp.

◆ get_dimensionality()

constexpr std::uint8_t gl::image_view::get_dimensionality ( ) const
inlineconstexprnoexcept

Returns the dimensionality of the image view.

Definition at line 81 of file image-view.hpp.

◆ get_first_array_layer()

constexpr std::uint32_t gl::image_view::get_first_array_layer ( ) const
inlineconstexprnoexcept

Returns the first array layer accessible to the view.

Definition at line 69 of file image-view.hpp.

◆ get_first_mip_level()

constexpr std::uint32_t gl::image_view::get_first_mip_level ( ) const
inlineconstexprnoexcept

Returns the first mipmap level accessible to the view.

Definition at line 57 of file image-view.hpp.

◆ get_format()

constexpr format gl::image_view::get_format ( ) const
inlineconstexprnoexcept

Returns the format and type used to interpret texel blocks of the image.

Definition at line 51 of file image-view.hpp.

◆ get_image()

constexpr const std::shared_ptr<image>& gl::image_view::get_image ( ) const
inlineconstexprnoexcept

Returns the image on which the view was created.

Definition at line 45 of file image-view.hpp.

◆ get_mip_level_count()

constexpr std::uint32_t gl::image_view::get_mip_level_count ( ) const
inlineconstexprnoexcept

Returns the number of mipmap levels accessible to the view.

Definition at line 63 of file image-view.hpp.

◆ is_1d()

constexpr bool gl::image_view::is_1d ( ) const
inlineconstexprnoexcept

Returns true if the image view is 1D, false otherwise.

Definition at line 87 of file image-view.hpp.

◆ is_2d()

constexpr bool gl::image_view::is_2d ( ) const
inlineconstexprnoexcept

Returns true if the image view is 2D, false otherwise.

Definition at line 93 of file image-view.hpp.

◆ is_3d()

constexpr bool gl::image_view::is_3d ( ) const
inlineconstexprnoexcept

Returns true if the image view is 3D, false otherwise.

Definition at line 99 of file image-view.hpp.

◆ is_array()

constexpr bool gl::image_view::is_array ( ) const
inlineconstexprnoexcept

Returns true if the image view is an array view, false otherwise.

Definition at line 105 of file image-view.hpp.

◆ is_cube()

constexpr bool gl::image_view::is_cube ( ) const
inlineconstexprnoexcept

Returns true if the image view is a cube map view, false otherwise.

Definition at line 111 of file image-view.hpp.

◆ operator=() [1/2]

image_view& gl::image_view::operator= ( const image_view )
delete

◆ operator=() [2/2]

image_view& gl::image_view::operator= ( image_view &&  )
delete

Friends And Related Function Documentation

◆ framebuffer

friend class framebuffer
friend

Definition at line 152 of file image-view.hpp.

◆ gl_shader_texture_1d

friend class gl_shader_texture_1d
friend

Definition at line 153 of file image-view.hpp.

◆ gl_shader_texture_2d

friend class gl_shader_texture_2d
friend

Definition at line 154 of file image-view.hpp.

◆ gl_shader_texture_3d

friend class gl_shader_texture_3d
friend

Definition at line 155 of file image-view.hpp.

◆ gl_shader_texture_cube

friend class gl_shader_texture_cube
friend

Definition at line 156 of file image-view.hpp.


The documentation for this class was generated from the following files: