![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <RenderTarget.h>
Public Types | |
enum class | Usage : U8 { RT_READ_WRITE = 0 , RT_READ_ONLY = 1 , RT_WRITE_ONLY = 2 } |
![]() | |
enum class | Type : U8 { RENDER_TARGET , SHADER_BUFFER , BUFFER , SHADER , SHADER_PROGRAM , TEXTURE , COUNT } |
Public Member Functions | |
virtual bool | create () |
Init all attachments. Returns false if already called. | |
bool | hasAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const |
bool | usesAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const |
RTAttachment * | getAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const |
U8 | getAttachmentCount (RTAttachmentType type) const noexcept |
U8 | getSampleCount () const noexcept |
bool | resize (U16 width, U16 height) |
Resize all attachments. | |
bool | updateSampleCount (U8 newSampleCount) |
Change msaa sampel count for all attachments. | |
U16 | getWidth () const noexcept |
U16 | getHeight () const noexcept |
vec2< U16 > | getResolution () const noexcept |
F32 & | depthClearValue () noexcept |
const Str< 64 > & | name () const noexcept |
![]() | |
GUIDWrapper () noexcept | |
GUIDWrapper (const GUIDWrapper &old) noexcept | |
GUIDWrapper (GUIDWrapper &&old) noexcept | |
virtual | ~GUIDWrapper ()=default |
FORCE_INLINE I64 | getGUID () const noexcept |
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
![]() | |
virtual | ~GraphicsResource () |
GFXDevice & | context () const noexcept |
U64 | nameHash () const noexcept |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
![]() | |
NonMovable (NonMovable &&)=delete | |
NonMovable & | operator= (NonMovable &&)=delete |
NonMovable (const NonMovable &)=default | |
NonMovable & | operator= (const NonMovable &)=default |
Protected Member Functions | |
RenderTarget (GFXDevice &context, const RenderTargetDescriptor &descriptor) | |
virtual bool | initAttachment (RTAttachment *att, RTAttachmentType type, RTColourAttachmentSlot slot) |
bool | autoResolveAttachment (RTAttachment *att) const |
![]() | |
GraphicsResource (GFXDevice &context, Type type, I64 GUID, U64 nameHash) | |
![]() | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
![]() | |
NonMovable ()=default | |
~NonMovable ()=default | |
Protected Attributes | |
RenderTargetDescriptor | _descriptor |
RTAttachment_uptr | _attachments [RT_MAX_ATTACHMENT_COUNT] {} |
bool | _attachmentsUsed [RT_MAX_ATTACHMENT_COUNT] = {} |
bool | _attachmentsAutoResolve [RT_MAX_ATTACHMENT_COUNT] = {} |
![]() | |
const I64 | _guid |
![]() | |
GFXDevice & | _context |
Additional Inherited Members | |
![]() | |
static I64 | generateGUID () noexcept |
Definition at line 60 of file RenderTarget.h.
|
strong |
Enumerator | |
---|---|
RT_READ_WRITE | |
RT_READ_ONLY | |
RT_WRITE_ONLY |
Definition at line 62 of file RenderTarget.h.
|
explicitprotected |
Definition at line 29 of file RenderTarget.cpp.
|
protected |
Definition at line 39 of file RenderTarget.cpp.
|
virtual |
Init all attachments. Returns false if already called.
Reimplemented in Divide::glFramebuffer, and Divide::vkRenderTarget.
Definition at line 49 of file RenderTarget.cpp.
|
noexcept |
Definition at line 240 of file RenderTarget.cpp.
RTAttachment * Divide::RenderTarget::getAttachment | ( | RTAttachmentType | type, |
RTColourAttachmentSlot | slot = RTColourAttachmentSlot::SLOT_0 |
||
) | const |
Definition at line 179 of file RenderTarget.cpp.
|
noexcept |
Definition at line 194 of file RenderTarget.cpp.
|
noexcept |
Definition at line 225 of file RenderTarget.cpp.
Definition at line 230 of file RenderTarget.cpp.
|
noexcept |
Definition at line 256 of file RenderTarget.cpp.
|
noexcept |
Definition at line 220 of file RenderTarget.cpp.
bool Divide::RenderTarget::hasAttachment | ( | RTAttachmentType | type, |
RTColourAttachmentSlot | slot = RTColourAttachmentSlot::SLOT_0 |
||
) | const |
Definition at line 169 of file RenderTarget.cpp.
|
protectedvirtual |
Reimplemented in Divide::glFramebuffer.
Definition at line 274 of file RenderTarget.cpp.
|
noexcept |
Definition at line 235 of file RenderTarget.cpp.
Resize all attachments.
Definition at line 245 of file RenderTarget.cpp.
bool Divide::RenderTarget::updateSampleCount | ( | U8 | newSampleCount | ) |
Change msaa sampel count for all attachments.
Definition at line 261 of file RenderTarget.cpp.
bool Divide::RenderTarget::usesAttachment | ( | RTAttachmentType | type, |
RTColourAttachmentSlot | slot = RTColourAttachmentSlot::SLOT_0 |
||
) | const |
Definition at line 174 of file RenderTarget.cpp.
|
protected |
Definition at line 102 of file RenderTarget.h.
|
protected |
Definition at line 104 of file RenderTarget.h.
|
protected |
Definition at line 103 of file RenderTarget.h.
|
protected |
Definition at line 100 of file RenderTarget.h.