Ion
|
An attachment represents a data store attached to one of the framebuffer's targets. More...
#include "framebufferobject.h"
Public Member Functions | |
Attachment () | |
Creates an unbound Attachment. More... | |
Attachment (Image::Format format, size_t samples) | |
Creates a render buffer attachment for multisampling. More... | |
Attachment (Image::Format format_in) | |
Creates a renderbuffer Attachment of the specified format. More... | |
Attachment (const ImagePtr &image_in) | |
Creates a renderbuffer Attachment from the passed image, which must be of type Image::kEgl or Image::kExternalEgl with format Image::kEglImage, otherwise the Attachment will be set to an unbound binding. More... | |
Attachment (const TexturePtr &texture_in) | |
Creates a texture Attachment using the passed TexturePtr. More... | |
Attachment (const TexturePtr &texture_in, size_t mip_level) | |
As above, but with specified mipmap level of the texture. More... | |
Attachment (const CubeMapTexturePtr &texture_in, CubeMapTexture::CubeFace face) | |
Similar to the constructor for a Texture, but uses the passed face of the cubemap as the backing store of the attachment. More... | |
Attachment (const CubeMapTexturePtr &texture_in, CubeMapTexture::CubeFace face, size_t mip_level) | |
As above, but with specified mipmap level of the cubemap texture. More... | |
Image::Format | GetFormat () const |
Gets the format of the attachment, which is the texture format if it is a texture attachment. More... | |
AttachmentBinding | GetBinding () const |
Gets the binding of the attachment. More... | |
const ImagePtr & | GetImage () const |
Gets the image of the attachment, if any. More... | |
const TexturePtr & | GetTexture () const |
Gets the texture of the attachment, if any. More... | |
const CubeMapTexturePtr & | GetCubeMapTexture () const |
Gets the cubemap of the attachment, if any. More... | |
CubeMapTexture::CubeFace | GetCubeMapFace () const |
Gets the cubemap face of the attachment. More... | |
size_t | GetMipLevel () const |
Returns the mipmap level of a Texture or CubeMapTexture attachment. More... | |
size_t | GetSamples () const |
Returns the number of samples for multisampling. More... | |
bool | operator!= (const Attachment &other) const |
Needed for Field::Set(). More... | |
An attachment represents a data store attached to one of the framebuffer's targets.
The AttachmentBinding of the attachment indicates its type, unbound, renderbuffer, or texture. See the class comment for a description of these different states.
Definition at line 77 of file framebufferobject.h.
ION_API ion::gfx::FramebufferObject::Attachment::Attachment | ( | ) |
Creates an unbound Attachment.
Definition at line 73 of file framebufferobject.cc.
References ion::gfx::FramebufferObject::kUnbound.
ION_API ion::gfx::FramebufferObject::Attachment::Attachment | ( | Image::Format | format, |
size_t | samples | ||
) |
Creates a render buffer attachment for multisampling.
Definition at line 77 of file framebufferobject.cc.
References ion::gfx::FramebufferObject::kRenderbuffer.
|
explicit |
Creates a renderbuffer Attachment of the specified format.
The format must be a supported format, or the Attachment will be set to an unbound binding.
Definition at line 84 of file framebufferobject.cc.
References ion::gfx::FramebufferObject::kRenderbuffer.
|
explicit |
Creates a renderbuffer Attachment from the passed image, which must be of type Image::kEgl or Image::kExternalEgl with format Image::kEglImage, otherwise the Attachment will be set to an unbound binding.
Definition at line 89 of file framebufferobject.cc.
References ion::base::SharedPtr< T >::Get(), ion::gfx::Image::kEgl, ion::gfx::Image::kEglImage, ion::gfx::Image::kExternalEgl, ion::gfx::FramebufferObject::kRenderbuffer, and ion::gfx::FramebufferObject::kUnbound.
|
explicit |
Creates a texture Attachment using the passed TexturePtr.
Note that the Texture will be resized to match the FramebufferObject's dimensions, but must contain an Image to specify the format to use. The format must be a supported type for the current platform, or the Attachment will be set to an unbound binding.
ION_API ion::gfx::FramebufferObject::Attachment::Attachment | ( | const TexturePtr & | texture_in, |
size_t | mip_level | ||
) |
As above, but with specified mipmap level of the texture.
Definition at line 104 of file framebufferobject.cc.
References ion::base::SharedPtr< T >::Get(), ion::gfx::FramebufferObject::kTexture, and ion::gfx::FramebufferObject::kUnbound.
ION_API ion::gfx::FramebufferObject::Attachment::Attachment | ( | const CubeMapTexturePtr & | texture_in, |
CubeMapTexture::CubeFace | face | ||
) |
Similar to the constructor for a Texture, but uses the passed face of the cubemap as the backing store of the attachment.
Definition at line 110 of file framebufferobject.cc.
References ion::base::SharedPtr< T >::Get(), ion::gfx::FramebufferObject::kCubeMapTexture, and ion::gfx::FramebufferObject::kUnbound.
ION_API ion::gfx::FramebufferObject::Attachment::Attachment | ( | const CubeMapTexturePtr & | texture_in, |
CubeMapTexture::CubeFace | face, | ||
size_t | mip_level | ||
) |
As above, but with specified mipmap level of the cubemap texture.
Definition at line 116 of file framebufferobject.cc.
References ion::base::SharedPtr< T >::Get(), ion::gfx::FramebufferObject::kCubeMapTexture, and ion::gfx::FramebufferObject::kUnbound.
|
inline |
Gets the binding of the attachment.
Definition at line 112 of file framebufferobject.h.
|
inline |
Gets the cubemap face of the attachment.
Definition at line 120 of file framebufferobject.h.
|
inline |
Gets the cubemap of the attachment, if any.
Definition at line 118 of file framebufferobject.h.
ION_API Image::Format ion::gfx::FramebufferObject::Attachment::GetFormat | ( | ) | const |
Gets the format of the attachment, which is the texture format if it is a texture attachment.
Definition at line 134 of file framebufferobject.cc.
References ion::gfx::Image::kRgba8888.
|
inline |
Gets the image of the attachment, if any.
Definition at line 114 of file framebufferobject.h.
|
inline |
Returns the mipmap level of a Texture or CubeMapTexture attachment.
Definition at line 122 of file framebufferobject.h.
|
inline |
Returns the number of samples for multisampling.
Definition at line 124 of file framebufferobject.h.
|
inline |
Gets the texture of the attachment, if any.
Definition at line 116 of file framebufferobject.h.
|
inline |
Needed for Field::Set().
Definition at line 127 of file framebufferobject.h.
References ion::base::SharedPtr< T >::Get().