omegalib  13.1
omega::RenderTarget Class Reference

#include <RenderTarget.h>

Public Types

enum  Type { RenderOnscreen, RenderOffscreen, RenderToTexture }
 

Public Member Functions

GLuint getId ()
 
virtual void dispose ()
 
int getWidth ()
 Render target configuration. More...
 
int getHeight ()
 
Type getType ()
 
void setTextureTarget (Texture *color, Texture *depth=NULL)
 
void setReadbackTarget (PixelData *color, PixelData *depth=NULL)
 
void setReadbackTarget (PixelData *color, PixelData *depth, const Rect &readbackViewport)
 
void clearDepth (bool enabled)
 
void clearColor (bool enabled)
 
TexturegetTextureColorTarget ()
 
TexturegetTextureDepthTarget ()
 
PixelDatagetOffscreenColorTarget ()
 
PixelDatagetOffscreenDepthTarget ()
 
void bind ()
 Drawing. More...
 
void unbind ()
 
bool isBound ()
 
void readback ()
 
void clear ()
 
- Public Member Functions inherited from omega::GpuResource
 GpuResource (GpuContext *ctx)
 
GpuContextgetContext ()
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Protected Member Functions

 RenderTarget (GpuContext *context, Type type, GLuint id=0)
 
 ~RenderTarget ()
 

Friends

class GpuContext
 

Additional Inherited Members

- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 
+ Inheritance diagram for omega::RenderTarget:

Member Enumeration Documentation

Enumerator
RenderOnscreen 

Render to the main framebuffer. Supports readback targets.

RenderOffscreen 

Render to an offscreen buffer. Supports readback targets.

RenderToTexture 

Render to a texture. Supports texture and readback targets.

Constructor & Destructor Documentation

omega::RenderTarget::RenderTarget ( GpuContext context,
Type  type,
GLuint  id = 0 
)
protected
omega::RenderTarget::~RenderTarget ( )
protected

Member Function Documentation

void omega::RenderTarget::bind ( )

Drawing.

void omega::RenderTarget::clear ( )
void omega::RenderTarget::clearColor ( bool  enabled)
void omega::RenderTarget::clearDepth ( bool  enabled)
virtual void omega::RenderTarget::dispose ( )
virtual

Implements omega::GpuResource.

int omega::RenderTarget::getHeight ( )
GLuint omega::RenderTarget::getId ( )
inline
PixelData* omega::RenderTarget::getOffscreenColorTarget ( )
inline
PixelData* omega::RenderTarget::getOffscreenDepthTarget ( )
inline
Texture* omega::RenderTarget::getTextureColorTarget ( )
inline
Texture* omega::RenderTarget::getTextureDepthTarget ( )
inline
RenderTarget::Type omega::RenderTarget::getType ( )
inline
int omega::RenderTarget::getWidth ( )

Render target configuration.

bool omega::RenderTarget::isBound ( )
inline
void omega::RenderTarget::readback ( )
void omega::RenderTarget::setReadbackTarget ( PixelData color,
PixelData depth = NULL 
)
void omega::RenderTarget::setReadbackTarget ( PixelData color,
PixelData depth,
const Rect readbackViewport 
)
void omega::RenderTarget::setTextureTarget ( Texture color,
Texture depth = NULL 
)
void omega::RenderTarget::unbind ( )

Friends And Related Function Documentation

friend class GpuContext
friend

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