gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmGraphics::ChromaKeyTexture Class Reference

Decoder of Yuv encoded texture into a new texture. More...

#include <ChromaKeyTexture.hh>

Inheritance diagram for gramods::gmGraphics::ChromaKeyTexture:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::ChromaKeyTexture:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

GLuint updateTexture (size_t frame_number, Eye eye) override
 Updates the texture and returns the ID of the associated GL texture object. More...
 
void setTexture (std::shared_ptr< TextureInterface > texture)
 Sets the texture to decode. More...
 
void setKey (gmCore::float3 key)
 Set the RGB key to mask with. More...
 
void setTolerance (gmCore::float2 tol)
 Set the minimum and maximum tolerances against the key when masking. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
- Public Member Functions inherited from gramods::gmGraphics::Texture
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void initialize ()
 Called to initialize the Object. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Detailed Description

Decoder of Yuv encoded texture into a new texture.

Member Function Documentation

◆ setKey()

void gramods::gmGraphics::ChromaKeyTexture::setKey ( gmCore::float3  key)

Set the RGB key to mask with.

Default is [0, 1, 0].

XML-attribute: key

◆ setTexture()

void gramods::gmGraphics::ChromaKeyTexture::setTexture ( std::shared_ptr< TextureInterface texture)

Sets the texture to decode.

◆ setTolerance()

void gramods::gmGraphics::ChromaKeyTexture::setTolerance ( gmCore::float2  tol)

Set the minimum and maximum tolerances against the key when masking.

This will specify a ramp in decimal CrCb (2D) color space. Default is [0.48, 0.50].

XML-attribute: key

◆ traverse()

void gramods::gmGraphics::ChromaKeyTexture::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.

◆ updateTexture()

GLuint gramods::gmGraphics::ChromaKeyTexture::updateTexture ( size_t  frame_number,
Eye  eye 
)
overridevirtual

Updates the texture and returns the ID of the associated GL texture object.

Must be called with GL context. Observe also that this method may perform off-screen rendering.

Parameters
frame_numberThe current frame being rendered. This number should increment by one for each frame, however it may wrap around and start over at zero.
eyeEye for which the texture is requested. An implementation may use different textures for different eyes or may reuse the same texture for all eyes.
Returns
OpenGL texture ID of the updated texture

Implements gramods::gmGraphics::TextureInterface.


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