FastUIDraw
Classes | Public Types | Public Member Functions | List of all members
fastuidraw::PainterSurface Class Referenceabstract

PainterSurface represents an interface to specify a buffer to which a PainterBackend renders content. More...

#include <painter_surface.hpp>

Inheritance diagram for fastuidraw::PainterSurface:
Inheritance graph
[legend]

Classes

class  Viewport
 

Public Types

enum  render_type_t { color_buffer_type, deferred_coverage_buffer_type, number_buffer_types }
 Enumeration to specify the render target of a Surface. More...
 

Public Member Functions

virtual const vec4clear_color (void) const =0
 
virtual void clear_color (const vec4 &)=0
 
ivec2 compute_visible_dimensions (void) const
 
virtual ivec2 dimensions (void) const =0
 
virtual reference_counted_ptr< const Imageimage (ImageAtlas &atlas) const =0
 
virtual enum render_type_t render_type (void) const =0
 
virtual const Viewportviewport (void) const =0
 
virtual void viewport (const Viewport &vwp)=0
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

PainterSurface represents an interface to specify a buffer to which a PainterBackend renders content.

Definition at line 39 of file painter_surface.hpp.

Member Enumeration Documentation

◆ render_type_t

Enumeration to specify the render target of a Surface.

Enumerator
color_buffer_type 

Indicates that a PainterSurface represents a color buffer; such PainterSurface objects are to also have a depth buffer as well.

deferred_coverage_buffer_type 

Indicates that a PainterSurface represents a coverage buffer; such surfaces will have the blending set to BlendMode::MAX and do not have a depth buffer.

Definition at line 46 of file painter_surface.hpp.

Member Function Documentation

◆ clear_color() [1/2]

virtual const vec4& fastuidraw::PainterSurface::clear_color ( void  ) const
pure virtual

To be implemented by a derived class to return the clear color.

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ clear_color() [2/2]

virtual void fastuidraw::PainterSurface::clear_color ( const vec4 )
pure virtual

To be implemented by a derived class to set the clear color.

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ compute_visible_dimensions()

ivec2 fastuidraw::PainterSurface::compute_visible_dimensions ( void  ) const
inline

Provided as a conveniance, equivalent to

Definition at line 332 of file painter_surface.hpp.

◆ dimensions()

virtual ivec2 fastuidraw::PainterSurface::dimensions ( void  ) const
pure virtual

To be implemented by a derived class to return the dimensions of the Surface backing store.

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ image()

virtual reference_counted_ptr<const Image> fastuidraw::PainterSurface::image ( ImageAtlas atlas) const
pure virtual

Return an Image whose backing is the same as this PainterSurface. It is expected that backing Image is the same for the lifetime of the PainterSurface. The caller gaurantees that the same ImageAtlas object will be passed on each call to image().

Parameters
atlasImageAtlas to manage the returned Image

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ render_type()

virtual enum render_type_t fastuidraw::PainterSurface::render_type ( void  ) const
pure virtual

To be implemented by a derived class to return the surface type of the Surface (i.e. is it a color buffer or a deferred coverage buffer).

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ viewport() [1/2]

virtual const Viewport& fastuidraw::PainterSurface::viewport ( void  ) const
pure virtual

To be implemented by a derived class to return the viewport into the Surface.

Implemented in fastuidraw::gl::PainterSurfaceGL.

◆ viewport() [2/2]

virtual void fastuidraw::PainterSurface::viewport ( const Viewport vwp)
pure virtual

To be implemented by a derived class to set the viewport into the surface. The viewport cannot be changed while the Surface is in use by a Painter Backend or Painter.

Parameters
vwpnew viewport into the surface to use

Implemented in fastuidraw::gl::PainterSurfaceGL.


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