8 #ifndef META_OCEAN_RENDERING_FRAMEBUFFER_H
9 #define META_OCEAN_RENDERING_FRAMEBUFFER_H
98 bool useStencilBuffer =
false;
173 virtual void viewport(
unsigned int& left,
unsigned int& top,
unsigned int& width,
unsigned int& height)
const;
300 virtual void setViewport(
const unsigned int left,
const unsigned int top,
const unsigned int width,
const unsigned int height);
400 inline void setPreRenderCallback(
const RenderCallback& renderCallback);
408 inline void setPostRenderCallback(
const RenderCallback& renderCallback);
467 inline Lock& lock()
const;
This class implements Ocean's image class.
Definition: Frame.h:1792
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition: Frame.h:183
This class implements an infinite line in 3D space.
Definition: Line3.h:70
This class implements a recursive lock object.
Definition: Lock.h:31
This class holds framebuffer configurations.
Definition: rendering/Framebuffer.h:94
This class is the base class for all rendering framebuffers.
Definition: rendering/Framebuffer.h:48
virtual bool isAntialiasingSupported(const unsigned int buffers) const
Returns whether the framebuffer supports hardware anti-aliasing.
virtual bool intersection(const Line3 &ray, RenderableRef &renderable, Vector3 &position)
Returns the renderable object intersected by a given ray.
virtual void render()
Renders the next frame into the framebuffer.
virtual bool hasExtension(const std::string &extension) const
Returns whether the framebuffer and thus e.g.
Callback< void, const size_t, const HomogenousMatrix4, const SquareMatrix4, const Timestamp > RenderCallback
Definition of a callback function for render events.
Definition: rendering/Framebuffer.h:140
virtual void viewport(unsigned int &left, unsigned int &top, unsigned int &width, unsigned int &height) const
Returns the viewport of this framebuffer.
virtual HomogenousMatrix4 device_T_display() const
Returns the transformation between display and device.
virtual bool initialize(const FramebufferRef &shareFramebuffer=FramebufferRef())
Initializes the framebuffer.
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.
virtual RenderTechnique renderTechnique() const
Returns the render technique of the entire framebuffer.
PhantomAttribute::PhantomMode PhantomMode
Definition of different rendering phantom modes.
Definition: rendering/Framebuffer.h:130
FramebufferType
Definition of different framebuffer types.
Definition: rendering/Framebuffer.h:55
@ FRAMEBUFFER_BITMAP
Bitmap framebuffer type.
Definition: rendering/Framebuffer.h:59
@ FRAMEBUFFER_INVALID
Invalid framebuffer type.
Definition: rendering/Framebuffer.h:57
RenderCallback postRenderCallback_
Optional callback function for post-render events.
Definition: rendering/Framebuffer.h:506
virtual bool isAntialiasing() const
Returns whether the framebuffer uses hardware anti-aliasing.
void setPreRenderCallback(const RenderCallback &renderCallback)
Sets an optional callback function for pre-render events.
Definition: rendering/Framebuffer.h:514
PrimitiveAttribute::LightingMode LightingMode
Definition of different face lighting modes.
Definition: rendering/Framebuffer.h:123
RenderTechnique
Definition of different render techniques.
Definition: rendering/Framebuffer.h:68
@ TECHNIQUE_TEXTURED
Render technique with textures.
Definition: rendering/Framebuffer.h:72
@ TECHNIQUE_FULL
Full render technique.
Definition: rendering/Framebuffer.h:70
@ TECHNIQUE_SHADED
Render technique with simple shading.
Definition: rendering/Framebuffer.h:74
RenderCallback preRenderCallback_
Optional callback function for pre-render events.
Definition: rendering/Framebuffer.h:503
virtual void removeScene(const SceneRef &scene)
Removes a scene from the framebuffer.
Framebuffer()
Creates a new framebuffer.
virtual bool setAntialiasing(const bool antialiasing)
Sets whether the framebuffer uses hardware anti-aliasing.
virtual void makeCurrent()
Makes this framebuffer to the current one.
ObjectType type() const override
Returns the type of this object.
virtual void setView(const ViewRef &view)
Connects a view with this framebuffer.
virtual void makeNoncurrent()
Makes this framebuffer to non current.
virtual void setPreferredPixelFormat(const FrameType::PixelFormat pixelFormat)
Sets the preferred pixel format of this framebuffer.
virtual void setVerticalSynchronization(const bool synchronize)
Sets whether the framebuffer will is synchronized with the vertical sync signal of the display device...
virtual FramebufferType framebufferType() const =0
Returns the type of this framebuffer.
virtual bool setSupportAntialiasing(const unsigned int buffers)
Sets whether this framebuffer will support hardware anti-aliasing.
virtual void setFaceMode(const FaceMode faceMode)
Sets the global face mode of the entire framebuffer.
void setPostRenderCallback(const RenderCallback &renderCallback)
Sets an optional callback function for pre-render events.
Definition: rendering/Framebuffer.h:521
virtual bool verticalSynchronization() const
Returns whether the framebuffer is synchronized with the vertical sync signal of the display device.
Lock & lock() const
Returns the lock object of this engine.
Definition: rendering/Framebuffer.h:509
virtual void addScene(const SceneRef &scene)
Adds a new scene to the framebuffer.
PrimitiveAttribute::FaceMode FaceMode
Definition of different rendering face modes.
Definition: rendering/Framebuffer.h:107
virtual bool render(Frame &frame, Frame *depthFrame=nullptr)
Renders the next frame and copies the image content into to a given frame.
Scenes framebufferScenes
Scenes registered at the framebuffer.
Definition: rendering/Framebuffer.h:497
virtual void setCullingMode(const CullingMode cullingMode)
Sets the global culling mode of the entire framebuffer.
~Framebuffer() override
Destructs a framebuffer.
virtual bool setDevice_T_display(const HomogenousMatrix4 &device_T_display)
Sets the transformation between display and device.
virtual void setLightingMode(const LightingMode lightingMode)
Sets the global lighting mode of the entire framebuffer.
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.
PrimitiveAttribute::CullingMode CullingMode
Definition of different rendering face culling modes.
Definition: rendering/Framebuffer.h:115
virtual std::string extensions() const
Returns all supported extensions of this framebuffer.
virtual void release()
Releases the framebuffer.
virtual const ViewRef & view() const
Returns the view connected with this framebuffer.
virtual const Scenes & scenes() const
Returns the scene connected with this framebuffer.
virtual CullingMode cullingMode() const
Returns the global face culling mode of the entire framebuffer.
ShadowTechnique
Definition of different shadow techniques.
Definition: rendering/Framebuffer.h:83
@ SHADOW_TECHNIQUE_NONE
No use of shadows.
Definition: rendering/Framebuffer.h:85
virtual void setRenderTechnique(const RenderTechnique technique)
Sets the rendering technique of the entire framebuffer.
virtual ShadowTechnique shadowTechnique() const
Returns the shadow technique of the entire framebuffer.
ViewRef framebufferView
View connected with the framebuffer.
Definition: rendering/Framebuffer.h:500
virtual bool setSupportQuadbufferedStereo(const bool enable)
Sets whether this framebuffer will support quad-buffered stereo views.
virtual LightingMode lightingMode() const
Returns the global lighting mode of the entire framebuffer.
virtual void clearScenes()
Clears all scenes registered at the framebuffer.
virtual bool isQuadbufferedStereoSupported() const
Returns whether the framebuffer supports quad-buffered stereo views.
virtual FaceMode faceMode() const
Returns the global face mode of the entire framebuffer.
virtual void setShadowTechnique(const ShadowTechnique technique)
Sets the shadow technique of the entire framebuffer.
This class is the base class for all rendering objects.
Definition: Object.h:54
Lock objectLock
Lock for the object.
Definition: Object.h:305
ObjectType
Definition of different object type.
Definition: Object.h:63
PhantomMode
Definition of different phantom modes.
Definition: PhantomAttribute.h:43
FaceMode
Defines different face rendering modes.
Definition: PrimitiveAttribute.h:42
CullingMode
Defines different face culling modes.
Definition: PrimitiveAttribute.h:57
LightingMode
Definition of different lighting modes.
Definition: PrimitiveAttribute.h:74
This class implements a scoped lock object for recursive lock objects.
Definition: Lock.h:135
float Scalar
Definition of a scalar type.
Definition: Math.h:128
SmartObjectRef< Framebuffer > FramebufferRef
Definition of a smart object reference holding a framebuffer.
Definition: rendering/Framebuffer.h:31
std::vector< SceneRef > Scenes
Definition of a vector holding scenes.
Definition: rendering/Scene.h:35
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15