|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:

List of all members.

## Public Member Functions

const char * | getId () const
Texture * | getTexture () const
unsigned int | getWidth () const
unsigned int | getHeight () const

## Static Public Member Functions

static RenderTarget * | create (const char *id, unsigned int width, unsigned int height)
static RenderTarget * | create (const char *id, Texture *texture)
static RenderTarget * | getRenderTarget (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:

  id | The ID of the new RenderTarget.
  width | The width of the new RenderTarget.
  height | The 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:

  id | The ID of the new RenderTarget.
  texture | The 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:

  id | The ID of the RenderTarget to search for.

Returns:
  The RenderTarget with the specified ID, or NULL if one was not found.

Texture* gameplay::RenderTarget::getTexture | ( |  | ) | const

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