Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
gamp::graph::gl::GraphRegion Class Reference

#include <GraphRegion.hpp>

Collaboration diagram for gamp::graph::gl::GraphRegion:

Public Types

enum class  DirtyBits : uint16_t { none = 0 , shape = 1 << 0 , state = 1 << 1 }
 
typedef jau::darray< uint32_t, glmemsize_tu32buffer_t
 

Public Member Functions

 GraphRegion (RenderMode m)
 
void addOutlineShape (GL &gl, OutlineShape &shape)
 
void addOutlineShape (OutlineShape &shape)
 
constexpr GLsizei arrayCompsPerElement () const noexcept
 
constexpr const AABBox3fbounds () const noexcept
 
void clear (GL &gl)
 
constexpr DirtyBits dirtyBits () const noexcept
 
void draw (GL &gl, GraphRenderer &renderer)
 Renders the associated OGL objects specifying current width/hight of window for optional multi pass rendering of the region.
 
constexpr bool hasColorChannel () const noexcept
 
constexpr bool hasNormalChannel () const noexcept
 
GLsizei indexCount () const noexcept
 
constexpr bool isShapeDirty () const noexcept
 Returns true if this region's shape are dirty, see markShapeDirty().
 
constexpr bool isStateDirty () const noexcept
 Returns true if this region's state is dirty, see markStateDirty().
 
 JAU_MAKE_BITFIELD_ENUM_STRING_MEMBER (DirtyBits, shape, state)
 
void markShapeDirty () noexcept
 Mark this region's shape dirty, i.e.
 
void markStateDirty () noexcept
 Mark this region's render-state dirty, i.e.
 
constexpr RenderMode renderMode () const noexcept
 
void seal (GL &gl, bool seal_)
 
std::string toString () noexcept
 
GLsizei vertexCount () const noexcept
 

Static Public Attributes

static constexpr int DEFAULT_TWO_PASS_TEXTURE_UNIT = 0
 

Detailed Description

Definition at line 43 of file GraphRegion.hpp.

Member Typedef Documentation

◆ u32buffer_t

Member Enumeration Documentation

◆ DirtyBits

enum class gamp::graph::gl::GraphRegion::DirtyBits : uint16_t
strong
Enumerator
none 
shape 
state 

Definition at line 49 of file GraphRegion.hpp.

Constructor & Destructor Documentation

◆ GraphRegion()

gamp::graph::gl::GraphRegion::GraphRegion ( RenderMode m)
inline

Definition at line 72 of file GraphRegion.hpp.

Member Function Documentation

◆ JAU_MAKE_BITFIELD_ENUM_STRING_MEMBER()

gamp::graph::gl::GraphRegion::JAU_MAKE_BITFIELD_ENUM_STRING_MEMBER ( DirtyBits ,
shape ,
state  )

◆ renderMode()

RenderMode gamp::graph::gl::GraphRegion::renderMode ( ) const
inlineconstexprnoexcept

Definition at line 87 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ hasNormalChannel()

bool gamp::graph::gl::GraphRegion::hasNormalChannel ( ) const
inlineconstexprnoexcept

Definition at line 88 of file GraphRegion.hpp.

◆ hasColorChannel()

bool gamp::graph::gl::GraphRegion::hasColorChannel ( ) const
inlineconstexprnoexcept

Definition at line 89 of file GraphRegion.hpp.

◆ arrayCompsPerElement()

GLsizei gamp::graph::gl::GraphRegion::arrayCompsPerElement ( ) const
inlineconstexprnoexcept

Definition at line 90 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ indexCount()

GLsizei gamp::graph::gl::GraphRegion::indexCount ( ) const
inlinenoexcept

Definition at line 92 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ vertexCount()

GLsizei gamp::graph::gl::GraphRegion::vertexCount ( ) const
inlinenoexcept

Definition at line 93 of file GraphRegion.hpp.

◆ clear()

void gamp::graph::gl::GraphRegion::clear ( GL & gl)
inline

Definition at line 95 of file GraphRegion.hpp.

◆ seal()

void gamp::graph::gl::GraphRegion::seal ( GL & gl,
bool seal_ )
inline

Definition at line 101 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ addOutlineShape() [1/2]

void gamp::graph::gl::GraphRegion::addOutlineShape ( GL & gl,
OutlineShape & shape )
inline

Definition at line 143 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ addOutlineShape() [2/2]

void gamp::graph::gl::GraphRegion::addOutlineShape ( OutlineShape & shape)
inline

Definition at line 148 of file GraphRegion.hpp.

◆ draw()

void gamp::graph::gl::GraphRegion::draw ( GL & gl,
GraphRenderer & renderer )
inline

Renders the associated OGL objects specifying current width/hight of window for optional multi pass rendering of the region.

User shall consider enabling the renderer beforehand and disabling it afterwards when used in conjunction with other renderer.

Users shall also consider setting the clear-color appropriately:

Definition at line 227 of file GraphRegion.hpp.

◆ bounds()

const AABBox3f & gamp::graph::gl::GraphRegion::bounds ( ) const
inlineconstexprnoexcept
Returns
the AxisAligned bounding box of current region

Definition at line 282 of file GraphRegion.hpp.

◆ markShapeDirty()

void gamp::graph::gl::GraphRegion::markShapeDirty ( )
inlinenoexcept

Mark this region's shape dirty, i.e.

its vertices, triangles, lines and/or color-texture coordinates changed.

The data will be re-uploaded to the GPU at next draw(..).

In 2-pass mode, this implies updating the FBO itself as well.

Definition at line 294 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ isShapeDirty()

bool gamp::graph::gl::GraphRegion::isShapeDirty ( ) const
inlineconstexprnoexcept

Returns true if this region's shape are dirty, see markShapeDirty().

Definition at line 297 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ markStateDirty()

void gamp::graph::gl::GraphRegion::markStateDirty ( )
inlinenoexcept

Mark this region's render-state dirty, i.e.

re-selecting a shader program regarding color-texture and -channel, and rendering the region into the FBO in 2-pass mode.

In 1-pass mode, re-selection of the shader-program is based on color-texture and -channel only.

Definition at line 306 of file GraphRegion.hpp.

Here is the caller graph for this function:

◆ isStateDirty()

bool gamp::graph::gl::GraphRegion::isStateDirty ( ) const
inlineconstexprnoexcept

Returns true if this region's state is dirty, see markStateDirty().

Definition at line 309 of file GraphRegion.hpp.

◆ dirtyBits()

DirtyBits gamp::graph::gl::GraphRegion::dirtyBits ( ) const
inlineconstexprnoexcept

Definition at line 311 of file GraphRegion.hpp.

◆ toString()

std::string gamp::graph::gl::GraphRegion::toString ( )
inlinenoexcept

Definition at line 320 of file GraphRegion.hpp.

Member Data Documentation

◆ DEFAULT_TWO_PASS_TEXTURE_UNIT

int gamp::graph::gl::GraphRegion::DEFAULT_TWO_PASS_TEXTURE_UNIT = 0
staticconstexpr

Definition at line 47 of file GraphRegion.hpp.


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