All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiGLFramebufferCache Class Referencefinal

Manages a cache of framebuffers based on graphics cmds descriptors. More...

Public Member Functions

HGIGL_API uint32_t AcquireFramebuffer (HgiGraphicsCmdsDesc const &desc, bool resolved=false)
 Get a framebuffer that matches the descriptor. More...
 
HGIGL_API void Clear ()
 Clears all framebuffersfrom cache. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const HgiGLFramebufferCache &fbc)
 

Detailed Description

Manages a cache of framebuffers based on graphics cmds descriptors.

Definition at line 44 of file framebufferCache.h.

Member Function Documentation

HGIGL_API uint32_t AcquireFramebuffer ( HgiGraphicsCmdsDesc const &  desc,
bool  resolved = false 
)

Get a framebuffer that matches the descriptor.

If the framebuffer exists in the cache, it will be returned. If none exist that match the descriptor, it will be created. Do not hold onto the returned id. Re-acquire it every frame.

When the cmds descriptor has resolved textures, two framebuffers are created for the MSAA and for the resolved textures. The bool flag can be used to access the respective ones.

HGIGL_API void Clear ( )

Clears all framebuffersfrom cache.

This should generally only be called when the device is being destroyed.


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