Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Types | Public Member Functions | Protected Attributes | List of all members
jop::RenderTarget Class Referenceabstract

#include <RenderTarget.hpp>

Inheritance diagram for jop::RenderTarget:
jop::RenderTexture jop::Window jop::MainRenderTarget

Public Types

enum  { ColorBit = 1, DepthBit = 1 << 1, StencilBit = 1 << 2, AllBit = ColorBit | DepthBit | StencilBit }
 

Public Member Functions

 RenderTarget ()
 Constructor. More...
 
virtual ~RenderTarget ()=0
 Virtual destructor. More...
 
void clear (const unsigned int bits)
 Clear the selected buffers. More...
 
virtual bool bind () const =0
 Bind this render target for drawing. More...
 
virtual glm::uvec2 getSize () const =0
 Get the size. More...
 
RenderTargetsetClearColor (const Color &color)
 Set the clear color. More...
 
Color getClearColor () const
 Get the clear color. More...
 
RenderTargetsetClearDepth (const float depth)
 Set the clear depth. More...
 
float getClearDepth () const
 Get the clear depth value. More...
 
RenderTargetsetClearStencil (const int stencil)
 Set the clear stencil. More...
 
int getClearStencil () const
 Get the clear stencil value. More...
 

Protected Attributes

std::recursive_mutex m_mutex
 Mutex. More...
 

Detailed Description

Definition at line 38 of file RenderTarget.hpp.

Member Enumeration Documentation

anonymous enum

Buffer clear bits

Enumerator
ColorBit 

Color bit.

DepthBit 

Depth bit.

StencilBit 

Stencil bit.

AllBit 

Clear all.

Definition at line 48 of file RenderTarget.hpp.

Constructor & Destructor Documentation

jop::RenderTarget::RenderTarget ( )

Constructor.

virtual jop::RenderTarget::~RenderTarget ( )
pure virtual

Virtual destructor.

Member Function Documentation

virtual bool jop::RenderTarget::bind ( ) const
pure virtual

Bind this render target for drawing.

Returns
True if successful

Implemented in jop::Window, and jop::RenderTexture.

void jop::RenderTarget::clear ( const unsigned int  bits)

Clear the selected buffers.

Parameters
bitsBit field describing the buffer combination to clear
Color jop::RenderTarget::getClearColor ( ) const

Get the clear color.

Returns
The clear color
float jop::RenderTarget::getClearDepth ( ) const

Get the clear depth value.

Returns
The clear depth value
int jop::RenderTarget::getClearStencil ( ) const

Get the clear stencil value.

Returns
The clear stencil value
virtual glm::uvec2 jop::RenderTarget::getSize ( ) const
pure virtual

Get the size.

Returns
The size in pixels

Implemented in jop::Window, and jop::RenderTexture.

RenderTarget& jop::RenderTarget::setClearColor ( const Color color)

Set the clear color.

Parameters
colorThe new clear color value
Returns
Reference to self
RenderTarget& jop::RenderTarget::setClearDepth ( const float  depth)

Set the clear depth.

Parameters
depthThe new clear depth value
Returns
Reference to self
RenderTarget& jop::RenderTarget::setClearStencil ( const int  stencil)

Set the clear stencil.

Parameters
stencilThe new clear stencil value
Returns
Reference to self

Member Data Documentation

std::recursive_mutex jop::RenderTarget::m_mutex
mutableprotected

Mutex.

Definition at line 130 of file RenderTarget.hpp.


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