AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
IRenderViewToTexture Class Referenceabstract

Rendering view to texture storage interface. More...

#include <AUI/Render/IRenderViewToTexture.h>

Classes#

struct  InvalidArea
 Defines areas to invalidate (redraw). More...
 

Public Member Functions#

virtual bool begin (IRenderer &renderer, glm::ivec2 surfaceSize, IRenderViewToTexture::InvalidArea &invalidArea)=0
 Instructs the renderer to begin drawing to the surface (framebuffer) stored in IRenderViewToTexture.
 
virtual void end (IRenderer &renderer)=0
 Finishes drawing operation started with begin method.
 
virtual void draw (IRenderer &renderer)=0
 Draws contents of the surface.
 

Static Public Member Functions#

static void enableForView (IRenderer &renderer, AView &view)
 
static void disableForView (AView &view)
 
static bool isEnabledForView (AView &view)
 

Detailed Description#

See also
IRenderer::newRenderViewToTexture
Examples
/home/runner/work/aui/aui/aui.views/src/AUI/View/AView.h.

Member Function Documentation#

◆ begin()#

virtual bool IRenderViewToTexture::begin ( IRenderer & renderer,
glm::ivec2 surfaceSize,
IRenderViewToTexture::InvalidArea & invalidArea )
pure virtual
Parameters
rendererrenderer to draw with. IRenderViewToTexture is expected to be associated with the renderer it's created with and normally this parameter is used to assert check the used renderer is the same.
surfaceSizeframebuffer size. Adjusts this value to achieve supersampling. Resizes the surface if mismatched with surfaceSize.
invalidAreainvalid areas to update. Should not be empty. Can be changed to InvalidArea::Full{} by implementation and caller is expected to react accordingly.
Returns
true on success, false otherwise

If needed, implementation may adjust renderer's transform matrix.

◆ draw()#

virtual void IRenderViewToTexture::draw ( IRenderer & renderer)
pure virtual
Parameters
rendererrenderer to draw with. IRenderViewToTexture is expected to be associated with the renderer it's created with and normally this parameter is used to assert check the used renderer is the same.

◆ end()#

virtual void IRenderViewToTexture::end ( IRenderer & renderer)
pure virtual
Parameters
rendererrenderer to draw with. IRenderViewToTexture is expected to be associated with the renderer it's created with and normally this parameter is used to assert check the used renderer is the same.

The caller is obligated to recover renderer's state prior to begin method call.