Xrb::Texture Class Reference

Directly stores, reads, and writes rasterized, pixel data. More...

#include <xrb_texture.hpp>

List of all members.

Public Types

enum  Format {
  GRAYSCALE1 = 0,
  GRAYSCALE4,
  GRAYSCALE8,
  GRAYSCALE16,
  GRAYSCALE_ALPHA1,
  GRAYSCALE_ALPHA4,
  GRAYSCALE_ALPHA8,
  GRAYSCALE_ALPHA16,
  RGB332,
  RGB4,
  RGB565,
  RGB8,
  RGB16,
  RGB5_A1,
  RGBA4,
  RGBA8,
  RGBA16,
  FORMAT_COUNT
}

Public Member Functions

ScreenCoordVector2 Size () const
ScreenCoord Width () const
ScreenCoord Height () const
Uint8 BitDepth () const
Uint32 DataLength () const
Uint8 * Data () const

Static Public Member Functions

static TextureCreate (std::string const &path)
static TextureCreate (ScreenCoordVector2 const &size, bool zero_out_the_data)
static TextureCreate (ScreenCoordVector2 const &size, Uint8 *data)


Detailed Description

Directly stores, reads, and writes rasterized, pixel data.

Texture objects should be instantiated by using one of the two Create methods provided.

File I/O is done using the PNG file format.

The raw texture data can be accessed directly through Data.

(not yet implemented:) The texture data can be stored/read/written in several bit-depth formats, given by Xrb::Texture::Format.

Definition at line 43 of file xrb_texture.hpp.


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8