AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
IRenderViewToTexture Class Referenceabstract

Rendering view to texture storage interface. More...

Detailed Description

Rendering view to texture storage interface.

See also
IRenderer::newRenderViewToTexture
Examples
/github/workspace/aui.views/src/AUI/View/AView.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. More...
 
virtual void end (IRenderer &renderer)=0
 Finishes drawing operation started with begin method. More...
 
virtual void draw (IRenderer &renderer)=0
 Draws contents of the surface. More...
 

Static Public Member Functions

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

Member Function Documentation

◆ begin()

virtual bool IRenderViewToTexture::begin ( IRenderer renderer,
glm::ivec2  surfaceSize,
IRenderViewToTexture::InvalidArea invalidArea 
)
pure virtual

Instructs the renderer to begin drawing to the surface (framebuffer) stored in IRenderViewToTexture.

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

Draws contents of the surface.

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

Finishes drawing operation started with begin method.

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.

#include <AUI/Render/IRenderViewToTexture.h>


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