Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | List of all members
om::graphics::devices::opengl::OpenGLFramebuffer Class Reference

A class that enables render-to-texture for OpenGL by specifying textures and their attachment points. More...

#include <omGraphicsOpenGLFramebuffer.h>

Inheritance diagram for om::graphics::devices::opengl::OpenGLFramebuffer:
om::graphics::textures::DeviceFramebuffer om::graphics::devices::DeviceResource

Public Member Functions

 ~OpenGLFramebuffer ()
 Destroy this framebuffer and all associated state. More...
 
virtual Bool getTarget (const FramebufferAttachment &attachment, Shared< DeviceTexture > &texture, TextureFace &face) const
 Get the texture and texture face that is attached at the specified framebuffer attachment point. More...
 
virtual Bool setTarget (const FramebufferAttachment &attachment, const Shared< DeviceTexture > &newTarget, TextureFace face=TextureFace::FRONT)
 Set the target texture for the specified framebuffer attachment point. More...
 
virtual void clearTargets ()
 Remove all attached target textures from this framebuffer. More...
 
virtual Size getMinimumSize (Index dimension) const
 Return the minimum size of the framebuffer in pixels along the specified dimension index. More...
 
virtual Size getMaximumSize (Index dimension) const
 Return the maximum size of the framebuffer in pixels along the specified dimension index. More...
 
virtual Bool isValid () const
 Return whether or not the framebuffer is valid and can be used as a render target. More...
 
OpenGLID getID () const
 Get a unique integral identifier for this framebuffer. More...
 
- Public Member Functions inherited from om::graphics::textures::DeviceFramebuffer
Size getSize (Index dimension) const
 Return the minimum size of the framebuffer in pixels along the specified dimension index. More...
 
- Public Member Functions inherited from om::graphics::devices::DeviceResource
virtual ~DeviceResource ()
 Destroy a device object, releasing all internal state. More...
 
GraphicsContextgetContext () const
 Return a pointer to the graphics context associated with this DeviceResource. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::graphics::textures::DeviceFramebuffer
 DeviceFramebuffer (devices::GraphicsContext *context)
 Create an empty framebuffer for the given context with no attached textures. More...
 
- Protected Member Functions inherited from om::graphics::devices::DeviceResource
 DeviceResource (GraphicsContext *newContext)
 Create a new device object that is associated with the specified graphics context. More...
 

Detailed Description

A class that enables render-to-texture for OpenGL by specifying textures and their attachment points.

Constructor & Destructor Documentation

om::graphics::devices::opengl::OpenGLFramebuffer::~OpenGLFramebuffer ( )

Destroy this framebuffer and all associated state.

Member Function Documentation

virtual Bool om::graphics::devices::opengl::OpenGLFramebuffer::getTarget ( const FramebufferAttachment attachment,
Shared< DeviceTexture > &  texture,
TextureFace face 
) const
virtual

Get the texture and texture face that is attached at the specified framebuffer attachment point.

If there is no attachment for that attachment point, the method has no effect and returns FALSE. Otherwise, the target texture and face are written to the output parameters and TRUE is returned.

Implements om::graphics::textures::DeviceFramebuffer.

virtual Bool om::graphics::devices::opengl::OpenGLFramebuffer::setTarget ( const FramebufferAttachment attachment,
const Shared< DeviceTexture > &  newTarget,
TextureFace  face = TextureFace::FRONT 
)
virtual

Set the target texture for the specified framebuffer attachment point.

If the specified Texture is valid and supports the specified texture face, and if the specified attachment point is supported and valid, the texture is used as the target for the specified attachment point and TRUE is returned indicating success. Otherwise, FALSE is returned indicating failure, leaving the framebuffer unchanged.

Implements om::graphics::textures::DeviceFramebuffer.

virtual void om::graphics::devices::opengl::OpenGLFramebuffer::clearTargets ( )
virtual

Remove all attached target textures from this framebuffer.

Implements om::graphics::textures::DeviceFramebuffer.

virtual Size om::graphics::devices::opengl::OpenGLFramebuffer::getMinimumSize ( Index  dimension) const
virtual

Return the minimum size of the framebuffer in pixels along the specified dimension index.

Implements om::graphics::textures::DeviceFramebuffer.

virtual Size om::graphics::devices::opengl::OpenGLFramebuffer::getMaximumSize ( Index  dimension) const
virtual

Return the maximum size of the framebuffer in pixels along the specified dimension index.

Implements om::graphics::textures::DeviceFramebuffer.

virtual Bool om::graphics::devices::opengl::OpenGLFramebuffer::isValid ( ) const
virtual

Return whether or not the framebuffer is valid and can be used as a render target.

Implements om::graphics::devices::DeviceResource.

OpenGLID om::graphics::devices::opengl::OpenGLFramebuffer::getID ( ) const
inline

Get a unique integral identifier for this framebuffer.


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