The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | List of all members
Wizt::VFrameBuffer::Renderer Class Referenceabstract

Base class for a renderer that is able to provide some pixel data. More...

#include <ocean/Anemonia/VFrameBuffer.hpp>

Inheritance diagram for Wizt::VFrameBuffer::Renderer:
MemCore::ReferenceBase< Renderer > MemCore::Intercube Wizt::GLRenderer

Classes

struct  LayeredRenderResultWithError
 

Public Member Functions

virtual bool canRender (const Size &Sz, format what=rgb, const type_info &type=typeid(unsigned char)) const
 Check in advance if this renderer is able to provide an image of the specified quality.
 
virtual LayeredRenderResultWithError grab (const VRequest &Context, const RefPtr< Grab > &, const Size &Sz, const RefPtr< VFrameBuffer::Grab::MovieManager > &M, const RefPtr< VRenderPrecision > &RenderHints, const RefPtr< VContext::Addendum > &ContextAddendum=nullptr) const =0
 Virtual grab function that knows how to get the render objects.
 
virtual LayeredRenderResultWithError grab (const VRequest &Context, const VSceneLayers &RenderObjects, const RefPtr< Grab > &, const Size &Sz, const RefPtr< VFrameBuffer::Grab::MovieManager > &M, const RefPtr< VRenderPrecision > &RenderHints, const RefPtr< VContext::Addendum > &ContextAddendum=nullptr) const =0
 Virtual grab function, it is supposed to call Grab::retrieve();.
 
bool ProcessTile (VGrabContext &theContext, const RefPtr< Grab > &Grabber, const ImageTile &theImageTile, const RefPtr< VFrameBuffer::Grab::MovieManager > &) const
 Call this function to deliver frame data to the Grab object after processing it with the local TileProcessor.
 
 Renderer (const WeakPtr< VRenderInterruptor > &theInterruptor)
 Constructor.
 
int Samples () const
 Current antialiasing sample.
 
virtual void setCamera (const VCamera &TheCameraSettings)
 An optionally implementable function that sets the camera parameters for the given shot.
 
virtual bool setupMultiSampling (int samples)
 Setup samples for antialiasing default for virtual function is just assignment implementation in derived class would check for hardware capabilities.
 
 ~Renderer ()
 Destructor.
 
- Public Member Functions inherited from MemCore::ReferenceBase< Renderer >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< Renderer, Renderer > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (Renderer *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 
- Public Member Functions inherited from MemCore::Intercube
void addInterface (const RefPtr< InterfaceBase > &I) const
 Add an interface class object.
 
template<class Data >
void addInterfaceData (const Data &D)
 Add data via an interface class object.
 
template<class Data , typename TypeSelector >
void addInterfaceData (const Data &D)
 Add data via an interface class object.
 
void clearInterfaces ()
 Remove all interfaces.
 
bool const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const
 Constant iterator.
 
virtual RefPtr< InterfaceBasecreateInterface (const type_info &) const
 Virtual function which allows derived objects to create Interface objects on demand.
 
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 Find a certain interface of specified type.
 
RefPtr< InterfaceBasegetInterface (const type_info &t)
 Retrieve an interface object from a certain type.
 
std::string getInterfaceNames (const char delim=';') const
 Debug function retrieving all interfaces as human-readable string.
 
template<class Data >
bool gotNewInterfaceData (const Data &D)
 Check whether data on the given interface have changed, and if so, set new data as interface.
 
template<class Data >
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector &S)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector *S)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data >
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D, const Selector &) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D, const Selector *) const
 Check whether interface data have changed.
 
bool hasInterface (const type_info &t) const
 Check if some Interface might exist.
 
 Intercube ()
 Constructor.
 
bool iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP)
 Modifyable iterator.
 
void printInterfaces () const
 Debug function that prints the names of all interfaces.
 
void registerInterface (const type_info &t)
 Register an interface type; when the interface is actually required, the virtual createInterface() function will be called.
 
template<class InterfaceType >
void removeInterface ()
 Remove an interface.
 
void removeInterfaceBase (const type_info &InterfaceBaseID)
 Remove an interface.
 
virtual ~Intercube ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< Renderer >
using reference_domain_t = Renderer
 The type of the base class.
 
using SelfPtr_t = WeakPtr< Renderer, Renderer >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< Renderer >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

Base class for a renderer that is able to provide some pixel data.

an implementation may use OpenGL or any other method to do so.

Member Function Documentation

◆ grab() [1/2]

virtual LayeredRenderResultWithError Wizt::VFrameBuffer::Renderer::grab ( const VRequest Context,
const RefPtr< Grab > &  ,
const Size Sz,
const RefPtr< VFrameBuffer::Grab::MovieManager > &  M,
const RefPtr< VRenderPrecision > &  RenderHints,
const RefPtr< VContext::Addendum > &  ContextAddendum = nullptr 
) const
pure virtual

Virtual grab function that knows how to get the render objects.

It is supposed to call Grab::retrieve();

Parameters
ContextThe VRequest providing the context in which this function is called. It is used to avoid infinite recursions.

◆ grab() [2/2]

VFrameBuffer::Renderer::LayeredRenderResultWithError Wizt::VFrameBuffer::Renderer::grab ( const VRequest Context,
const VSceneLayers &  RenderObjects,
const RefPtr< Grab > &  ,
const Size Sz,
const RefPtr< VFrameBuffer::Grab::MovieManager > &  M,
const RefPtr< VRenderPrecision > &  RenderHints,
const RefPtr< VContext::Addendum > &  ContextAddendum = nullptr 
) const
pure virtual

Virtual grab function, it is supposed to call Grab::retrieve();.

Parameters
RenderObjectsThe objects that should be rendered here.
ContextThe VRequest providing the context in which this function is called. It is used to avoid infinite recursions.

◆ setCamera()

void Wizt::VFrameBuffer::Renderer::setCamera ( const VCamera TheCameraSettings)
virtual

An optionally implementable function that sets the camera parameters for the given shot.

This function is called after the grab() function, once all the rendering is done, because the camera settings may depend on the viewpoint settings that are determined during rendering.

It is the responsibility of the recording function to determine such camera parameters correctly and call this function. The implementation of a Grabber should not rely on this function to be called at all.