v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::ColormapSlot Struct Reference

A ColormapSlot refers to a single colormap index on a single cube. More...

#include <sifteo/video/color.h>

Public Member Functions

RGB565 get () const
 Retrieve this color, as an RGB565 value.
 
const ColormapSlotoperator= (RGB565 color) const
 Set the color in this slot to a specifc RGB565 value.
 
const ColormapSlotoperator= (uint32_t color) const
 Set the color in this slot to the specified packed RGB color. More...
 
void set (RGB565 color) const
 Set the color in this colormap slot to the specified RGB565 value.
 
void set (uint8_t r, uint8_t g, uint8_t b) const
 Set the color in this slot to the specified 8-bit RGB value.
 
void set (float r, float g, float b) const
 Set the color in this slot to the specified floating point RGB value.
 
void set (uint32_t rgb) const
 Set the color in this slot to the specified packed RGB color. More...
 

Detailed Description

A ColormapSlot refers to a single colormap index on a single cube.

Typically these are transient objects which are used to implement assignment and retrieval of colormap entries using the array indexing operator, but it is also possible to store ColormapSlot references.

A ColormapSlot acts as an accessor for memory which is part of your VideoBuffer. When you read or write colormap entries via this object, you're reading or writing VRAM.

Member Function Documentation

const ColormapSlot& Sifteo::ColormapSlot::operator= ( uint32_t  color) const
inline

Set the color in this slot to the specified packed RGB color.

This can be a convenient way to specify colors as hexadecimal constants, of the form 0xRRGGBB.

void Sifteo::ColormapSlot::set ( uint32_t  rgb) const
inline

Set the color in this slot to the specified packed RGB color.

This can be a convenient way to specify colors as hexadecimal constants, of the form 0xRRGGBB.


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