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

A class that specifies an operation performed between the source and destination colors when blending. More...

#include <omGraphicsBlendFunction.h>

Public Types

enum  Enum {
  UNDEFINED = 0, ADD = 1, SUBTRACT = 2, REVERSE_SUBTRACT = 3,
  MIN = 4, MAX = 5
}
 An enum type which represents the type of blend function. More...
 

Public Member Functions

 BlendFunction ()
 Create a new default blend function with the UNDEFINED enum value. More...
 
 BlendFunction (Enum newFunction)
 Create a new blend function with the specified blend function enum value. More...
 
 operator Enum () const
 Convert this blend function type to an enum value. More...
 
String toString () const
 Return a string representation of the blend function. More...
 
 operator String () const
 Convert this blend function into a string representation. More...
 

Detailed Description

A class that specifies an operation performed between the source and destination colors when blending.

This operation is performed on a per-component basis and the result of the function is the final color for the framebuffer for a given fragment.

Member Enumeration Documentation

An enum type which represents the type of blend function.

Enumerator
UNDEFINED 

An undefined blend function.

ADD 

A blend function where the final color is the sum of the source and destination blend factors.

This blend function is useful for effects like antialiasing and transparency.

SUBTRACT 

A blend function where the final color is the source blend factor minus the destination blend factor.

REVERSE_SUBTRACT 

A blend function where the final color is the destination blend factor minus the source blend factor.

MIN 

A blend function where the final color is the minimum of the source and destination blend factors.

MAX 

A blend function where the final color is the maximum of the source and destination blend factors.

Constructor & Destructor Documentation

om::graphics::base::BlendFunction::BlendFunction ( )
inline

Create a new default blend function with the UNDEFINED enum value.

om::graphics::base::BlendFunction::BlendFunction ( Enum  newFunction)
inline

Create a new blend function with the specified blend function enum value.

Member Function Documentation

om::graphics::base::BlendFunction::operator Enum ( ) const
inline

Convert this blend function type to an enum value.

String om::graphics::base::BlendFunction::toString ( ) const

Return a string representation of the blend function.

om::graphics::base::BlendFunction::operator String ( ) const
inline

Convert this blend function into a string representation.


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