omegalib  13.1
omega::PixelData Class Reference

#include <PixelData.h>

Public Types

enum  Format { FormatRgb, FormatRgba, FormatMonochrome }
 
enum  UsageFlags { PixelBufferObject = 1 << 1 }
 

Public Member Functions

 PixelData (Format fmt, int width, int height, byte *data=NULL, uint usageFlags=0)
 
virtual ~PixelData ()
 
bytemap ()
 
void unmap ()
 
bytebind (const GpuContext *context)
 
void unbind ()
 
void resize (int width, int height)
 
int getWidth ()
 
int getHeight ()
 
Format getFormat ()
 
size_t getSize ()
 
int getPitch ()
 
int getBpp ()
 
uint getRedMask ()
 
uint getGreenMask ()
 
uint getBlueMask ()
 
uint getAlphaMask ()
 
void setDeleteDisabled (bool value)
 
bool isDeleteDisabled ()
 
bool checkUsage (UsageFlags flag)
 
void copyFrom (PixelData *other)
 
void beginPixelAccess ()
 Simple pixel access. More...
 
void setPixel (int x, int y, int r, int g, int b, int a)
 
int getPixelR (int x, int y)
 
int getPixelB (int x, int y)
 
int getPixelG (int x, int y)
 
int getPixelA (int x, int y)
 
void endPixelAccess ()
 
- Public Member Functions inherited from omega::TextureSource
 TextureSource ()
 
virtual ~TextureSource ()
 
virtual TexturegetTexture (const DrawContext &context)
 
virtual void attachTexture (Texture *tex, const DrawContext &context)
 
virtual bool isDirty ()
 
virtual void setDirty (bool value=true)
 
void requireExplicitClean (bool value)
 When enabled, the TextureSource object stays dirty even after all the associated Textures have been updated, and will be marked as clean only Through an explicit setDirty(false) call. More...
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Static Public Member Functions

static PixelDatacreate (int width, int height, Format fmt)
 Static creation function to keep consistent with Python API. More...
 
- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 

Protected Member Functions

void refreshTexture (Texture *texture, const DrawContext &context)
 

Additional Inherited Members

- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 
+ Inheritance diagram for omega::PixelData:

Member Enumeration Documentation

Enumerator
FormatRgb 
FormatRgba 
FormatMonochrome 
Enumerator
PixelBufferObject 

Constructor & Destructor Documentation

omega::PixelData::PixelData ( Format  fmt,
int  width,
int  height,
byte data = NULL,
uint  usageFlags = 0 
)
virtual omega::PixelData::~PixelData ( )
virtual

Member Function Documentation

void omega::PixelData::beginPixelAccess ( )

Simple pixel access.

byte* omega::PixelData::bind ( const GpuContext context)
bool omega::PixelData::checkUsage ( UsageFlags  flag)
inline
void omega::PixelData::copyFrom ( PixelData other)
static PixelData* omega::PixelData::create ( int  width,
int  height,
Format  fmt 
)
static

Static creation function to keep consistent with Python API.

void omega::PixelData::endPixelAccess ( )
uint omega::PixelData::getAlphaMask ( )
uint omega::PixelData::getBlueMask ( )
int omega::PixelData::getBpp ( )
Format omega::PixelData::getFormat ( )
inline
uint omega::PixelData::getGreenMask ( )
int omega::PixelData::getHeight ( )
inlinevirtual

Reimplemented from omega::TextureSource.

int omega::PixelData::getPitch ( )
int omega::PixelData::getPixelA ( int  x,
int  y 
)
int omega::PixelData::getPixelB ( int  x,
int  y 
)
int omega::PixelData::getPixelG ( int  x,
int  y 
)
int omega::PixelData::getPixelR ( int  x,
int  y 
)
uint omega::PixelData::getRedMask ( )
size_t omega::PixelData::getSize ( )
inline
int omega::PixelData::getWidth ( )
inlinevirtual

Reimplemented from omega::TextureSource.

bool omega::PixelData::isDeleteDisabled ( )
inline
byte* omega::PixelData::map ( )
void omega::PixelData::refreshTexture ( Texture texture,
const DrawContext context 
)
protectedvirtual

Implements omega::TextureSource.

void omega::PixelData::resize ( int  width,
int  height 
)
void omega::PixelData::setDeleteDisabled ( bool  value)
inline
void omega::PixelData::setPixel ( int  x,
int  y,
int  r,
int  g,
int  b,
int  a 
)
void omega::PixelData::unbind ( )
void omega::PixelData::unmap ( )

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