overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions
gameplay::RenderTarget Class Reference

#include <RenderTarget.h>

Inheritance diagram for gameplay::RenderTarget:
gameplay::Ref

List of all members.

Public Member Functions

const char * getId () const
TexturegetTexture () const
unsigned int getWidth () const
unsigned int getHeight () const

Static Public Member Functions

static RenderTargetcreate (const char *id, unsigned int width, unsigned int height)
static RenderTargetcreate (const char *id, Texture *texture)
static RenderTargetgetRenderTarget (const char *id)

Detailed Description

Defines a linear area of display memory and usually resides in the display memory of the graphics device.


Member Function Documentation

static RenderTarget* gameplay::RenderTarget::create ( const char *  id,
unsigned int  width,
unsigned int  height 
) [static]

Create a RenderTarget and add it to the list of available RenderTargets.

The created RenderTarget contains a 32-bit texture with a single/base mipmap level only.

Parameters:
idThe ID of the new RenderTarget.
widthThe width of the new RenderTarget.
heightThe height of the new RenderTarget.
Returns:
A newly created RenderTarget.
static RenderTarget* gameplay::RenderTarget::create ( const char *  id,
Texture texture 
) [static]

Create a RenderTarget from the given Texture and add it to the list of available RenderTargets.

Note that different hardware and OpenGL versions have different capabilities and restrictions on what texture formats are supported as render targets.

Parameters:
idThe ID of the new RenderTarget.
textureThe texture for the new RenderTarget.
Returns:
A newly created RenderTarget.
unsigned int gameplay::RenderTarget::getHeight ( ) const

Returns the height of the RenderTarget.

Returns:
The height.
const char* gameplay::RenderTarget::getId ( ) const

Get the ID of this RenderTarget.

Returns:
The ID of this RenderTarget.
static RenderTarget* gameplay::RenderTarget::getRenderTarget ( const char *  id) [static]

Get a named RenderTarget from its ID.

Parameters:
idThe ID of the RenderTarget to search for.
Returns:
The RenderTarget with the specified ID, or NULL if one was not found.

Get the backing texture of this RenderTarget.

Returns:
The backing texture of this RenderTarget.
unsigned int gameplay::RenderTarget::getWidth ( ) const

Returns the width of the RenderTarget.

Returns:
The width.
 All Classes Functions Variables Typedefs Enumerations Enumerator