Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::graphics::textures::FramebufferAttachment Class Reference

A class that specifies how a texture should be attached to a Framebuffer. More...

#include <omGraphicsFramebufferAttachment.h>

Public Types

enum  Type { COLOR, DEPTH, STENCIL, UNDEFINED }
 An enum that specifies the different types of framebuffer attachment points. More...
 

Public Member Functions

 FramebufferAttachment (Type newType)
 Create a new framebuffer attachment type with the specified type enum value and index 0. More...
 
 FramebufferAttachment (Type newType, Index newIndex)
 Create a new framebuffer attachment type with the specified type enum value and index. More...
 
Type getType () const
 Return the type of attachment point that this object refers to. More...
 
Index getIndex () const
 Return the index of the attachment point. More...
 
Bool operator== (const FramebufferAttachment &other) const
 Return whether or not this framebuffer attachment point is equal to another. More...
 
Bool operator!= (const FramebufferAttachment &other) const
 Return whether or not this framebuffer attachment point is not equal to another. More...
 
Bool supportsFormat (TextureFormat format) const
 Return whether or not this framebuffer attachment point supports the specified texture format. More...
 
String toString () const
 Return a string representation of the framebuffer attachement type. More...
 
 operator String () const
 Convert this framebuffer attachement type into a string representation. More...
 
Hash getHashCode () const
 Return a hash code generated for this framebuffer attachment point. More...
 

Detailed Description

A class that specifies how a texture should be attached to a Framebuffer.

Since a framebuffer has multiple kinds of bitplanes that can be rendered to, it is necessary to specify how each texture that is attached to the framebuffer is used. The 3 basic types of attachment points are color, depth, and stencil attachments.

Member Enumeration Documentation

An enum that specifies the different types of framebuffer attachment points.

Enumerator
COLOR 

An attachment point that is for a color texture.

There can be multiple color attachment points (implementation defined maximum).

DEPTH 

An attachment point that is for a depth texture.

There can be only 1 depth attachment point that has index 0.

STENCIL 

An attachment point that is for a stencil texture.

There can be only 1 stencil attachment point that has index 0.

UNDEFINED 

An undefined attachment point type.

Constructor & Destructor Documentation

om::graphics::textures::FramebufferAttachment::FramebufferAttachment ( Type  newType)
inline

Create a new framebuffer attachment type with the specified type enum value and index 0.

om::graphics::textures::FramebufferAttachment::FramebufferAttachment ( Type  newType,
Index  newIndex 
)
inline

Create a new framebuffer attachment type with the specified type enum value and index.

If the specified attachment type is not COLOR, the specified index value is automatically set to 0 because multiple depth or stencil attachments are not supported.

Member Function Documentation

Type om::graphics::textures::FramebufferAttachment::getType ( ) const
inline

Return the type of attachment point that this object refers to.

Index om::graphics::textures::FramebufferAttachment::getIndex ( ) const
inline

Return the index of the attachment point.

This value allows the user to specify multiple color attachments. Multiple depth or stencil attachments are not supported, index 0 is the only allowed value.

Bool om::graphics::textures::FramebufferAttachment::operator== ( const FramebufferAttachment other) const
inline

Return whether or not this framebuffer attachment point is equal to another.

Bool om::graphics::textures::FramebufferAttachment::operator!= ( const FramebufferAttachment other) const
inline

Return whether or not this framebuffer attachment point is not equal to another.

Bool om::graphics::textures::FramebufferAttachment::supportsFormat ( TextureFormat  format) const

Return whether or not this framebuffer attachment point supports the specified texture format.

String om::graphics::textures::FramebufferAttachment::toString ( ) const

Return a string representation of the framebuffer attachement type.

om::graphics::textures::FramebufferAttachment::operator String ( ) const
inline

Convert this framebuffer attachement type into a string representation.

Hash om::graphics::textures::FramebufferAttachment::getHashCode ( ) const
inline

Return a hash code generated for this framebuffer attachment point.


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