Skip to content
slaeshjag edited this page Mar 24, 2013 · 2 revisions

This is the main libdarnit header. It includes all the other headers in libdarnit.

DARNIT_PFORMAT

typedef enum {
        DARNIT_PFORMAT_RGBA8 = 0,
        DARNIT_PFORMAT_RGBA4 = 1,
        DARNIT_PFORMAT_RGB5A1 = 2,
        DARNIT_PFORMAT_ALPHA = 3,
} DARNIT_PFORMAT;

These enums defines the pixel formats supported by libdarnit. Pretty much every function that loads a texture takes a pixel format as an argument for converting the texture to the desired bit depth.

  • RGBA8 is 8-bit per channel, 32 bit per pixel
  • RGBA4 is 4 bits per channel, 16 bits per pixel
  • RGB5A1 is 5 bits for R, G and B channels, 1 bit for alpha. 16 bits per pixel
  • ALPHA is just an 8-bit alpha channel. 8 bit per pixel. No color information.

Clone this wiki locally