clan::PixelBufferProvider Class Reference - ClanLib SDK
Description: clan::PixelBufferProvider Class Reference

Public Member Functions | List of all members
clan::PixelBufferProvider Class Referenceabstract
clanDisplay Display

Element Array Buffer provider. More...

`#include <pixel_buffer_provider.h>`

## Public Member Functions
virtual | ~PixelBufferProvider ()
virtual void | create (const void *data, const Size &new_size, PixelBufferDirection direction, TextureFormat new_format, BufferUsage usage)=0
| Create.
virtual void * | get_data ()=0
| Retrieves a pointer to the mapped buffer.
virtual TextureFormat | get_format () const =0
| Returns the pixel format.
virtual int | get_pitch () const =0
| Retrieves the pitch of the mapped buffer. Use this after get_data()
virtual Size | get_size () const =0
virtual bool | is_gpu () const =0
| Returns true if this pixel buffer is a GPU based one.
virtual void | lock (GraphicContext &gc, BufferAccess access)=0
| Maps buffer into system memory.
virtual void | unlock ()=0
| Unmaps element buffer.
virtual void | upload_data (GraphicContext &gc, const Rect &dest_rect, const void *data)=0
| Uploads data to buffer.

## Detailed Description

Element Array Buffer provider.

## Constructor & Destructor Documentation

## ◆ ~PixelBufferProvider()

virtual clan::PixelBufferProvider::~PixelBufferProvider | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ create()

virtual void clan::PixelBufferProvider::create | ( | const void * | data,
|  | const Size & | new_size,
|  | PixelBufferDirection | direction,
|  | TextureFormat | new_format,
|  | BufferUsage | usage )
| pure virtual

Create.

Parameters

  data | = void
  new_width | = New width
  new_height | = New height
  direction | = Direction
  new_format | = New format
  usage | = Buffer Usage

## ◆ get_data()

virtual void * clan::PixelBufferProvider::get_data | ( |  | ) |
| pure virtual

Retrieves a pointer to the mapped buffer.

## ◆ get_format()

virtual TextureFormat clan::PixelBufferProvider::get_format | ( |  | ) | const
| pure virtual

Returns the pixel format.

## ◆ get_pitch()

virtual int clan::PixelBufferProvider::get_pitch | ( |  | ) | const
| pure virtual

Retrieves the pitch of the mapped buffer. Use this after get_data()

## ◆ get_size()

virtual Size clan::PixelBufferProvider::get_size | ( |  | ) | const
| pure virtual

## ◆ is_gpu()

virtual bool clan::PixelBufferProvider::is_gpu | ( |  | ) | const
| pure virtual

Returns true if this pixel buffer is a GPU based one.

## ◆ lock()

virtual void clan::PixelBufferProvider::lock | ( | GraphicContext & | gc,
|  | BufferAccess | access )
| pure virtual

Maps buffer into system memory.

## ◆ unlock()

virtual void clan::PixelBufferProvider::unlock | ( |  | ) |
| pure virtual

Unmaps element buffer.

## ◆ upload_data()

virtual void clan::PixelBufferProvider::upload_data | ( | GraphicContext & | gc,
|  | const Rect & | dest_rect,
|  | const void * | data )
| pure virtual

Uploads data to buffer.

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

- pixel_buffer_provider.h