Cogl.PixelBuffer

g Cogl.Object Cogl.Object Cogl.PixelBuffer Cogl.PixelBuffer Cogl.Object->Cogl.PixelBuffer

Subclasses:

None

Methods

Inherited:

Cogl.Object (2)

class

new (context, size, data)

Virtual Methods

None

Fields

None

Class Details

class Cogl.PixelBuffer
Bases:

Cogl.Object

Abstract:

No

classmethod new(context, size, data)
Parameters:
  • context (Cogl.Context) – A Cogl.Context

  • size (int) – The number of bytes to allocate for the pixel data.

  • data (object or None) – An optional pointer to vertex data to upload immediately

Returns:

a newly allocated Cogl.PixelBuffer

Return type:

Cogl.PixelBuffer

Declares a new Cogl.PixelBuffer of size bytes to contain arrays of pixels. Once declared, data can be set using Cogl.buffer_set_data() or by mapping it into the application’s address space using Cogl.buffer_map().

If data isn’t None then size bytes will be read from data and immediately copied into the new buffer.

New in version 1.10.