Ocean
Ocean::Rendering::Framebuffer Class Referenceabstract

This class is the base class for all rendering framebuffers. More...

Inheritance diagram for Ocean::Rendering::Framebuffer:

Data Structures

class  FramebufferConfig
 This class holds framebuffer configurations. More...
 

Public Types

enum  FramebufferType { FRAMEBUFFER_INVALID , FRAMEBUFFER_BITMAP , FRAMEBUFFER_WINDOW }
 Definition of different framebuffer types. More...
 
enum  RenderTechnique { TECHNIQUE_FULL , TECHNIQUE_TEXTURED , TECHNIQUE_SHADED , TECHNIQUE_UNLIT }
 Definition of different render techniques. More...
 
enum  ShadowTechnique { SHADOW_TECHNIQUE_NONE , SHADOW_TECHNIQUE_MAPS }
 Definition of different shadow techniques. More...
 
typedef PrimitiveAttribute::FaceMode FaceMode
 Definition of different rendering face modes. More...
 
typedef PrimitiveAttribute::CullingMode CullingMode
 Definition of different rendering face culling modes. More...
 
typedef PrimitiveAttribute::LightingMode LightingMode
 Definition of different face lighting modes. More...
 
typedef PhantomAttribute::PhantomMode PhantomMode
 Definition of different rendering phantom modes. More...
 
typedef Callback< void, const size_t, const HomogenousMatrix4, const SquareMatrix4, const TimestampRenderCallback
 Definition of a callback function for render events. More...
 
- Public Types inherited from Ocean::Rendering::Object
enum  ObjectType {
  TYPE_UNKNOWN , TYPE_ABSOLUTE_TRANSFORM , TYPE_ATTRIBUTE , TYPE_ATTRIBUTE_SET ,
  TYPE_BACKGROUND , TYPE_BILLBOARD , TYPE_BITMAP_FRAMEBUFFER , TYPE_BLEND_ATTRIBUTE ,
  TYPE_BOX , TYPE_CONE , TYPE_CYLINDER , TYPE_DEPTH_ATTRIBUTE ,
  TYPE_DIRECTIONAL_LIGHT , TYPE_FRAMEBUFFER , TYPE_FRAME_TEXTURE_2D , TYPE_GEOMETRY ,
  TYPE_GROUP , TYPE_INDEPENDENT_PRIMITIVE , TYPE_LIGHT_SOURCE , TYPE_LINES ,
  TYPE_LINE_STRIPS , TYPE_LOD , TYPE_MATERIAL , TYPE_NODE ,
  TYPE_OBJECT , TYPE_PARALLEL_VIEW , TYPE_PERSPECTIVE_VIEW , TYPE_PHANTOM_ATTRIBUTE ,
  TYPE_POINT_LIGHT , TYPE_POINTS , TYPE_PRIMITIVE , TYPE_PRIMITIVE_ATTRIBUTE ,
  TYPE_QUAD_STRIPS , TYPE_QUADS , TYPE_RENDERABLE , TYPE_SCENE ,
  TYPE_SHADER_PROGRAM , TYPE_SHAPE , TYPE_SKY_BACKGROUND , TYPE_SPHERE ,
  TYPE_SPOT_LIGHT , TYPE_STEREO_ATTRIBUTE , TYPE_STEREO_VIEW , TYPE_STRIP_PRIMITIVE ,
  TYPE_SWITCH , TYPE_TEXT , TYPE_TEXTURE , TYPE_TEXTURE_2D ,
  TYPE_MEDIA_TEXTURE_2D , TYPE_TEXTURE_FRAMEBUFFER , TYPE_TEXTURES , TYPE_TRANSFORM ,
  TYPE_TRIANGLE_FANS , TYPE_TRIANGLES , TYPE_TRIANGLE_STRIPS , TYPE_UNDISTORTED_BACKGROUND ,
  TYPE_VERTEX_SET , TYPE_VIEW , TYPE_WINDOW_FRAMEBUFFER
}
 Definition of different object type. More...
 
typedef std::unordered_map< ObjectId, unsigned int > ObjectIdMap
 Definition of a map holding object ids to reference counters. More...
 

Public Member Functions

virtual FramebufferType framebufferType () const =0
 Returns the type of this framebuffer. More...
 
virtual const Scenesscenes () const
 Returns the scene connected with this framebuffer. More...
 
virtual const ViewRefview () const
 Returns the view connected with this framebuffer. More...
 
virtual void viewport (unsigned int &left, unsigned int &top, unsigned int &width, unsigned int &height) const
 Returns the viewport of this framebuffer. More...
 
virtual FaceMode faceMode () const
 Returns the global face mode of the entire framebuffer. More...
 
virtual CullingMode cullingMode () const
 Returns the global face culling mode of the entire framebuffer. More...
 
virtual LightingMode lightingMode () const
 Returns the global lighting mode of the entire framebuffer. More...
 
virtual RenderTechnique renderTechnique () const
 Returns the render technique of the entire framebuffer. More...
 
virtual bool isQuadbufferedStereoSupported () const
 Returns whether the framebuffer supports quad-buffered stereo views. More...
 
virtual bool isAntialiasingSupported (const unsigned int buffers) const
 Returns whether the framebuffer supports hardware anti-aliasing. More...
 
virtual bool isAntialiasing () const
 Returns whether the framebuffer uses hardware anti-aliasing. More...
 
virtual ShadowTechnique shadowTechnique () const
 Returns the shadow technique of the entire framebuffer. More...
 
virtual HomogenousMatrix4 device_T_display () const
 Returns the transformation between display and device. More...
 
virtual bool verticalSynchronization () const
 Returns whether the framebuffer is synchronized with the vertical sync signal of the display device. More...
 
virtual std::string extensions () const
 Returns all supported extensions of this framebuffer. More...
 
virtual bool hasExtension (const std::string &extension) const
 Returns whether the framebuffer and thus e.g. More...
 
virtual void addScene (const SceneRef &scene)
 Adds a new scene to the framebuffer. More...
 
virtual void removeScene (const SceneRef &scene)
 Removes a scene from the framebuffer. More...
 
virtual void clearScenes ()
 Clears all scenes registered at the framebuffer. More...
 
virtual void setView (const ViewRef &view)
 Connects a view with this framebuffer. More...
 
virtual void setViewport (const unsigned int left, const unsigned int top, const unsigned int width, const unsigned int height)
 Sets the viewport of this framebuffer. More...
 
virtual void setPreferredPixelFormat (const FrameType::PixelFormat pixelFormat)
 Sets the preferred pixel format of this framebuffer. More...
 
virtual void setFaceMode (const FaceMode faceMode)
 Sets the global face mode of the entire framebuffer. More...
 
virtual void setCullingMode (const CullingMode cullingMode)
 Sets the global culling mode of the entire framebuffer. More...
 
virtual void setLightingMode (const LightingMode lightingMode)
 Sets the global lighting mode of the entire framebuffer. More...
 
virtual void setRenderTechnique (const RenderTechnique technique)
 Sets the rendering technique of the entire framebuffer. More...
 
virtual bool setSupportQuadbufferedStereo (const bool enable)
 Sets whether this framebuffer will support quad-buffered stereo views. More...
 
virtual bool setSupportAntialiasing (const unsigned int buffers)
 Sets whether this framebuffer will support hardware anti-aliasing. More...
 
virtual bool setAntialiasing (const bool antialiasing)
 Sets whether the framebuffer uses hardware anti-aliasing. More...
 
virtual void setShadowTechnique (const ShadowTechnique technique)
 Sets the shadow technique of the entire framebuffer. More...
 
virtual bool setDevice_T_display (const HomogenousMatrix4 &device_T_display)
 Sets the transformation between display and device. More...
 
virtual void setVerticalSynchronization (const bool synchronize)
 Sets whether the framebuffer will is synchronized with the vertical sync signal of the display device. More...
 
void setPreRenderCallback (const RenderCallback &renderCallback)
 Sets an optional callback function for pre-render events. More...
 
void setPostRenderCallback (const RenderCallback &renderCallback)
 Sets an optional callback function for pre-render events. More...
 
virtual void render ()
 Renders the next frame into the framebuffer. More...
 
virtual bool render (Frame &frame, Frame *depthFrame=nullptr)
 Renders the next frame and copies the image content into to a given frame. More...
 
virtual bool intersection (const Line3 &ray, RenderableRef &renderable, Vector3 &position)
 Returns the renderable object intersected by a given ray. More...
 
virtual void makeCurrent ()
 Makes this framebuffer to the current one. More...
 
virtual void makeNoncurrent ()
 Makes this framebuffer to non current. More...
 
virtual bool linearizeDepthFrame (Frame &depthFrame, const Scalar nearDistance, const Scalar farDistance) const
 Linearizes a given z-buffer depth frame with non-linear (e.g., logarithmic) depth. More...
 
ObjectType type () const override
 Returns the type of this object. More...
 
Locklock () const
 Returns the lock object of this engine. More...
 
- Public Member Functions inherited from Ocean::Rendering::Object
ObjectId id () const
 Returns the unique object id of this object. More...
 
const std::string & name () const
 Returns the name of this object. More...
 
virtual void setName (const std::string &name)
 Sets or changes the name of this object. More...
 
virtual const std::string & engineName () const =0
 Returns the name of the owner engine. More...
 
ObjectRefs parentObjects () const
 Returns all parent objects. More...
 
ObjectRefSet parentNodes () const
 Returns all parent nodes. More...
 
virtual std::string descriptiveInformation () const
 Returns descriptive information about the object as string. More...
 

Protected Member Functions

 Framebuffer ()
 Creates a new framebuffer. More...
 
 ~Framebuffer () override
 Destructs a framebuffer. More...
 
virtual bool initialize (const FramebufferRef &shareFramebuffer=FramebufferRef())
 Initializes the framebuffer. More...
 
virtual void release ()
 Releases the framebuffer. More...
 
- Protected Member Functions inherited from Ocean::Rendering::Object
 Object ()
 Creates a new object. More...
 
 Object (const Object &object)=delete
 Disabled copy constructor. More...
 
virtual ~Object ()
 Destructs an object. More...
 
Engineengine () const
 Returns the render engine which is owner of this object. More...
 
void registerParent (const ObjectId parentId)
 Registers a parent node for this (child) node. More...
 
void unregisterParent (const ObjectId parentId)
 Unregisters a parent node for this (child) node. More...
 
void registerThisObjectAsParent (const ObjectRef &child)
 Registers this object at a child as parent object. More...
 
void unregisterThisObjectAsParent (const ObjectRef &child)
 Unregisters this object from a child as parent. More...
 
Objectoperator= (const Object &object)=delete
 Disabled copy operator. More...
 

Protected Attributes

Scenes framebufferScenes
 Scenes registered at the framebuffer. More...
 
ViewRef framebufferView
 View connected with the framebuffer. More...
 
RenderCallback preRenderCallback_
 Optional callback function for pre-render events. More...
 
RenderCallback postRenderCallback_
 Optional callback function for post-render events. More...
 
- Protected Attributes inherited from Ocean::Rendering::Object
Lock objectLock
 Lock for the object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Ocean::Rendering::Object
static std::string translateObjectType (const ObjectType objectType)
 Translates an object type to a readable string. More...
 

Detailed Description

This class is the base class for all rendering framebuffers.

The framebuffer holds the view, the scene and is able to render frames respectively.
A framebuffer instance can be received from the associated engine instance.

See also
Engine, Scene, View

Member Typedef Documentation

◆ CullingMode

Definition of different rendering face culling modes.

These modes correspond to those defined in PrimitiveAttribute except the meaning of the default culling mode.
The default culling mode gives the responsibility to the renderable object themselves, and does not overwrite the global state.

See also
PrimitiveAttribute::CullingMode.

◆ FaceMode

Definition of different rendering face modes.

These modes correspond to those defined in PrimitiveAttribute except the meaning of the default mode.
The default face mode gives the responsibility to the renderable object themselves, and does not overwrite the global state.

See also
PrimitiveAttribute::FaceMode.

◆ LightingMode

Definition of different face lighting modes.

These modes correspond to those defined in PrimitiveAttribute except the meaning of the default lighting mode.
The default culling mode gives the responsibility to the renderable object themselves, and does not overwrite the global state.

See also
PrimitiveAttribute::LightingMode.

◆ PhantomMode

Definition of different rendering phantom modes.

These modes correspond to those defined in PhantomMode except the meaning of the default culling mode.
The default culling mode gives the responsibility to the renderable objects themselves, and does not overwrite the global state.

◆ RenderCallback

Definition of a callback function for render events.

This callback can be used to apply custom render calls if necessary. First parameter (eyeIndex): The index of the framebuffer (eye) to be rendered, will always be 0 in a mono view Second parameter (view_T_world): The current transformation between world and the current view (camera/eye), also known as viewing matrix Third parameter (projection): The projection matrix of the view (eye) Fourth parameter (predictedDisplayTime): The predicted timestamp when the image will be display

Member Enumeration Documentation

◆ FramebufferType

Definition of different framebuffer types.

Enumerator
FRAMEBUFFER_INVALID 

Invalid framebuffer type.

FRAMEBUFFER_BITMAP 

Bitmap framebuffer type.

FRAMEBUFFER_WINDOW 

Window framebuffer type.

◆ RenderTechnique

Definition of different render techniques.

Enumerator
TECHNIQUE_FULL 

Full render technique.

TECHNIQUE_TEXTURED 

Render technique with textures.

TECHNIQUE_SHADED 

Render technique with simple shading.

TECHNIQUE_UNLIT 

Render technique without lighting.

◆ ShadowTechnique

Definition of different shadow techniques.

Enumerator
SHADOW_TECHNIQUE_NONE 

No use of shadows.

SHADOW_TECHNIQUE_MAPS 

Use of shadow maps.

Constructor & Destructor Documentation

◆ Framebuffer()

Ocean::Rendering::Framebuffer::Framebuffer ( )
protected

Creates a new framebuffer.

◆ ~Framebuffer()

Ocean::Rendering::Framebuffer::~Framebuffer ( )
overrideprotected

Destructs a framebuffer.

Member Function Documentation

◆ addScene()

virtual void Ocean::Rendering::Framebuffer::addScene ( const SceneRef scene)
virtual

Adds a new scene to the framebuffer.

Parameters
sceneThe scene to add
See also
removeScene(), clearScenes(), scenes().

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ clearScenes()

virtual void Ocean::Rendering::Framebuffer::clearScenes ( )
virtual

Clears all scenes registered at the framebuffer.

See also
addScene(), removeScene(), scenes().

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ cullingMode()

virtual CullingMode Ocean::Rendering::Framebuffer::cullingMode ( ) const
virtual

Returns the global face culling mode of the entire framebuffer.

Returns
Global framebuffer culling mode
See also
setCullingMode(), PrimitiveAttribute::cullingMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ device_T_display()

virtual HomogenousMatrix4 Ocean::Rendering::Framebuffer::device_T_display ( ) const
virtual

Returns the transformation between display and device.

Returns
The transformation between display and device

Reimplemented in Ocean::Rendering::GLESceneGraph::QT::GLESWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::Apple::GLESWindowFramebuffer.

◆ extensions()

virtual std::string Ocean::Rendering::Framebuffer::extensions ( ) const
virtual

Returns all supported extensions of this framebuffer.

Returns
Extensions separated by a blank
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ faceMode()

virtual FaceMode Ocean::Rendering::Framebuffer::faceMode ( ) const
virtual

Returns the global face mode of the entire framebuffer.

Returns
Global framebuffer face mode
See also
setFaceMode(), PrimitiveAttribute::faceMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ framebufferType()

virtual FramebufferType Ocean::Rendering::Framebuffer::framebufferType ( ) const
pure virtual

Returns the type of this framebuffer.

Returns
Framebuffer type

Implemented in Ocean::Rendering::WindowFramebuffer, and Ocean::Rendering::BitmapFramebuffer.

◆ hasExtension()

virtual bool Ocean::Rendering::Framebuffer::hasExtension ( const std::string &  extension) const
virtual

Returns whether the framebuffer and thus e.g.

the platform supports a specific extension.

Parameters
extensionThe extension to check, must be valid
Returns
True, if the extension is supported
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ initialize()

virtual bool Ocean::Rendering::Framebuffer::initialize ( const FramebufferRef shareFramebuffer = FramebufferRef())
protectedvirtual

◆ intersection()

virtual bool Ocean::Rendering::Framebuffer::intersection ( const Line3 ray,
RenderableRef renderable,
Vector3 position 
)
virtual

Returns the renderable object intersected by a given ray.

Parameters
rayIntersection ray
renderableResulting renderable object intersected by the given ray, if any
positionResulting intersection point on the renderable object
Returns
True, if a renderable object has been intersected

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ isAntialiasing()

virtual bool Ocean::Rendering::Framebuffer::isAntialiasing ( ) const
virtual

Returns whether the framebuffer uses hardware anti-aliasing.

Returns
True, if so
See also
isAntialiasingSupported().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, Ocean::Rendering::GLESceneGraph::Windows::GLESWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ isAntialiasingSupported()

virtual bool Ocean::Rendering::Framebuffer::isAntialiasingSupported ( const unsigned int  buffers) const
virtual

Returns whether the framebuffer supports hardware anti-aliasing.

Parameters
buffersNumber of buffers to be checked
Returns
True, if so
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, Ocean::Rendering::GLESceneGraph::Windows::GLESWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ isQuadbufferedStereoSupported()

virtual bool Ocean::Rendering::Framebuffer::isQuadbufferedStereoSupported ( ) const
virtual

Returns whether the framebuffer supports quad-buffered stereo views.

Returns
True, if so
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ lightingMode()

virtual LightingMode Ocean::Rendering::Framebuffer::lightingMode ( ) const
virtual

Returns the global lighting mode of the entire framebuffer.

Returns
Global framebuffer lighting mode
See also
setLightingMode(), PrimitiveAttribute::lightingMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ linearizeDepthFrame()

virtual bool Ocean::Rendering::Framebuffer::linearizeDepthFrame ( Frame depthFrame,
const Scalar  nearDistance,
const Scalar  farDistance 
) const
virtual

Linearizes a given z-buffer depth frame with non-linear (e.g., logarithmic) depth.

Parameters
depthFrameThe non-linear depth to linearize, must be valid
nearDistanceThe distance to the near clipping plane of the depth frame, with range (0, infinity)
farDistanceThe distance to the far clipping plane of the depth frame, with range (nearDistance, infinity)
Returns
True, if succeeded

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ lock()

Lock & Ocean::Rendering::Framebuffer::lock ( ) const
inline

Returns the lock object of this engine.

Beware: Use this lock with caution.

Returns
Engine lock object

◆ makeCurrent()

virtual void Ocean::Rendering::Framebuffer::makeCurrent ( )
virtual

◆ makeNoncurrent()

virtual void Ocean::Rendering::Framebuffer::makeNoncurrent ( )
virtual

◆ release()

◆ removeScene()

virtual void Ocean::Rendering::Framebuffer::removeScene ( const SceneRef scene)
virtual

Removes a scene from the framebuffer.

Parameters
sceneThe scene to remove
See also
addScene(), clearScenes(), scenes().

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ render() [1/2]

◆ render() [2/2]

virtual bool Ocean::Rendering::Framebuffer::render ( Frame frame,
Frame depthFrame = nullptr 
)
virtual

Renders the next frame and copies the image content into to a given frame.

Parameters
frameThe frame receiving the image content, will be modified if the frame is invalid or if the frame type does not match
depthFrameOptional resulting depth frame, nullptr if not of interest
Returns
True, if succeeded; False, if the function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::Windows::GLESBitmapFramebuffer, and Ocean::Rendering::GLESceneGraph::Apple::GLESBitmapFramebuffer.

◆ renderTechnique()

virtual RenderTechnique Ocean::Rendering::Framebuffer::renderTechnique ( ) const
virtual

Returns the render technique of the entire framebuffer.

Returns
Framebuffer render technique
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ scenes()

virtual const Scenes& Ocean::Rendering::Framebuffer::scenes ( ) const
virtual

Returns the scene connected with this framebuffer.

Returns
Scene connected with this framebuffer
See also
addScenes(), removeScene(), clearScenes().

◆ setAntialiasing()

virtual bool Ocean::Rendering::Framebuffer::setAntialiasing ( const bool  antialiasing)
virtual

Sets whether the framebuffer uses hardware anti-aliasing.

The framebuffer must support anti-aliasing to set this option.

See also
setSupportAntialiasing().
Parameters
antialiasingTrue, if so
Returns
True, if succeeded

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ setCullingMode()

virtual void Ocean::Rendering::Framebuffer::setCullingMode ( const CullingMode  cullingMode)
virtual

Sets the global culling mode of the entire framebuffer.

This culling mode can be used to overwrite the individual modes of all renderable nodes.

Parameters
cullingModeGlobal culling mode to set
See also
cullingMode(), PrimitiveAttribute::setCullingMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ setDevice_T_display()

virtual bool Ocean::Rendering::Framebuffer::setDevice_T_display ( const HomogenousMatrix4 device_T_display)
virtual

Sets the transformation between display and device.

Parameters
device_T_displayThe transformation between display and device, must be valid
Returns
True, if the transformation could be set

Reimplemented in Ocean::Rendering::GLESceneGraph::QT::GLESWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::Apple::GLESWindowFramebuffer.

◆ setFaceMode()

virtual void Ocean::Rendering::Framebuffer::setFaceMode ( const FaceMode  faceMode)
virtual

Sets the global face mode of the entire framebuffer.

This face mode can be used to overwrite the individual modes of all renderable nodes.

Parameters
faceModeGlobal face mode to set
See also
faceMode(), PrimitiveAttribute::setFaceMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::GLESFramebuffer, and Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ setLightingMode()

virtual void Ocean::Rendering::Framebuffer::setLightingMode ( const LightingMode  lightingMode)
virtual

Sets the global lighting mode of the entire framebuffer.

This lighting mode can be used to overwrite the individual modes of all renderable nodes.

Parameters
lightingModeGlobal lighting mode to set
See also
lightingMode(), PrimitiveAttribute::setLightingMode().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ setPostRenderCallback()

void Ocean::Rendering::Framebuffer::setPostRenderCallback ( const RenderCallback renderCallback)
inline

Sets an optional callback function for pre-render events.

The callback function will be invoked after the scene graph content has been rendered into the framebuffer.

Parameters
renderCallbackThe callback function to be set, an invalid object to remove a previously registered callback
See also
setPreRenderCallback().

◆ setPreferredPixelFormat()

virtual void Ocean::Rendering::Framebuffer::setPreferredPixelFormat ( const FrameType::PixelFormat  pixelFormat)
virtual

Sets the preferred pixel format of this framebuffer.

This value should be defined before initialization during e.g. a window context.
Beware: There is no guarantee that this pixel format can be provides by the underlying hardware!

Parameters
pixelFormatThe preferred pixel format used for rendering
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GLESceneGraph::Windows::GLESWindowFramebuffer.

◆ setPreRenderCallback()

void Ocean::Rendering::Framebuffer::setPreRenderCallback ( const RenderCallback renderCallback)
inline

Sets an optional callback function for pre-render events.

The callback function will be invoked after the framebuffer has been cleared but before the scene graph content is rendered into the framebuffer.

Parameters
renderCallbackThe callback function to be set, an invalid object to remove a previously registered callback
See also
setPostRenderCallback().

◆ setRenderTechnique()

virtual void Ocean::Rendering::Framebuffer::setRenderTechnique ( const RenderTechnique  technique)
virtual

Sets the rendering technique of the entire framebuffer.

Parameters
techniqueRender technique to set
See also
renderTechnique().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ setShadowTechnique()

virtual void Ocean::Rendering::Framebuffer::setShadowTechnique ( const ShadowTechnique  technique)
virtual

Sets the shadow technique of the entire framebuffer.

Parameters
techniqueShadow technique to set
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ setSupportAntialiasing()

virtual bool Ocean::Rendering::Framebuffer::setSupportAntialiasing ( const unsigned int  buffers)
virtual

Sets whether this framebuffer will support hardware anti-aliasing.

Beware: Set this option once before initialization

Parameters
buffersNumber of buffers used for anti-aliasing
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::Windows::GLESWindowFramebuffer.

◆ setSupportQuadbufferedStereo()

virtual bool Ocean::Rendering::Framebuffer::setSupportQuadbufferedStereo ( const bool  enable)
virtual

Sets whether this framebuffer will support quad-buffered stereo views.

Beware: Set this option once before initialization

Parameters
enableTrue, if quad-buffered stereo views will be supported
Returns
True, if succeeded
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ setVerticalSynchronization()

virtual void Ocean::Rendering::Framebuffer::setVerticalSynchronization ( const bool  synchronize)
virtual

Sets whether the framebuffer will is synchronized with the vertical sync signal of the display device.

Parameters
synchronizeTrue, if so
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ setView()

virtual void Ocean::Rendering::Framebuffer::setView ( const ViewRef view)
virtual

Connects a view with this framebuffer.

Parameters
viewThe view to set
See also
view().

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer.

◆ setViewport()

virtual void Ocean::Rendering::Framebuffer::setViewport ( const unsigned int  left,
const unsigned int  top,
const unsigned int  width,
const unsigned int  height 
)
virtual

Sets the viewport of this framebuffer.

Parameters
leftNew left position of the framebuffer in pixel
topNew top position of the framebuffer in pixel
widthNew width of the framebuffer in pixel
heightNew height of the framebuffer in pixel
See also
viewport().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, Ocean::Rendering::GLESceneGraph::Windows::GLESBitmapFramebuffer, Ocean::Rendering::GLESceneGraph::GLESFramebuffer, and Ocean::Rendering::GLESceneGraph::Apple::GLESBitmapFramebuffer.

◆ shadowTechnique()

virtual ShadowTechnique Ocean::Rendering::Framebuffer::shadowTechnique ( ) const
virtual

Returns the shadow technique of the entire framebuffer.

Returns
Framebuffer shadow technique
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIWindowFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

◆ type()

ObjectType Ocean::Rendering::Framebuffer::type ( ) const
overridevirtual

Returns the type of this object.

See also
Object::type().

Reimplemented from Ocean::Rendering::Object.

Reimplemented in Ocean::Rendering::WindowFramebuffer.

◆ verticalSynchronization()

virtual bool Ocean::Rendering::Framebuffer::verticalSynchronization ( ) const
virtual

Returns whether the framebuffer is synchronized with the vertical sync signal of the display device.

Returns
True, if so
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

◆ view()

virtual const ViewRef& Ocean::Rendering::Framebuffer::view ( ) const
virtual

Returns the view connected with this framebuffer.

Returns
View connected with this framebuffer
See also
setView().

◆ viewport()

virtual void Ocean::Rendering::Framebuffer::viewport ( unsigned int &  left,
unsigned int &  top,
unsigned int &  width,
unsigned int &  height 
) const
virtual

Returns the viewport of this framebuffer.

Parameters
leftResulting left framebuffer position in pixel
topResulting top framebuffer position in pixel
widthResulting framebuffer width in pixel
heightResulting framebuffer height in pixel
See also
setViewport().
Exceptions
NotSupportedExceptionIs thrown if this function is not supported

Reimplemented in Ocean::Rendering::GlobalIllumination::GIFramebuffer, and Ocean::Rendering::GLESceneGraph::GLESFramebuffer.

Field Documentation

◆ framebufferScenes

Scenes Ocean::Rendering::Framebuffer::framebufferScenes
protected

Scenes registered at the framebuffer.

◆ framebufferView

ViewRef Ocean::Rendering::Framebuffer::framebufferView
protected

View connected with the framebuffer.

◆ postRenderCallback_

RenderCallback Ocean::Rendering::Framebuffer::postRenderCallback_
protected

Optional callback function for post-render events.

◆ preRenderCallback_

RenderCallback Ocean::Rendering::Framebuffer::preRenderCallback_
protected

Optional callback function for pre-render events.


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