OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Macros | Functions
pixel.cpp File Reference

Pixel buffer utilities. More...

#include "global.h"
#include "utils/pixel.h"
Include dependency graph for pixel.cpp:

Go to the source code of this file.

Macros

#define NEXT_POWER(x)
 

Functions

unsigned char * generateColorTexture (glm::vec4 rgba, unsigned int width, unsigned int height, unsigned int bpp)
 
void argb2rgba32 (unsigned char *image, unsigned int w, unsigned int h)
 
unsigned char * argb16to32 (unsigned char *image, unsigned int w, unsigned int h)
 
unsigned char * grayscale2rgba (unsigned char *image, unsigned int w, unsigned int h)
 
unsigned char * scaleBuffer (unsigned char *image, unsigned int *w, unsigned int *h, unsigned int bpp)
 

Detailed Description

Pixel buffer utilities.

Author
xythobuz

Definition in file pixel.cpp.

Macro Definition Documentation

#define NEXT_POWER (   x)
Value:
do { \
unsigned int i; \
for (i = 1; i < (x); i *= 2); \
(x) = i; \
} while (false);

Definition at line 80 of file pixel.cpp.

Function Documentation

unsigned char* generateColorTexture ( glm::vec4  rgba,
unsigned int  width,
unsigned int  height,
unsigned int  bpp 
)

Definition at line 11 of file pixel.cpp.

void argb2rgba32 ( unsigned char *  image,
unsigned int  w,
unsigned int  h 
)

Definition at line 29 of file pixel.cpp.

unsigned char* argb16to32 ( unsigned char *  image,
unsigned int  w,
unsigned int  h 
)

Definition at line 44 of file pixel.cpp.

unsigned char* grayscale2rgba ( unsigned char *  image,
unsigned int  w,
unsigned int  h 
)

Definition at line 65 of file pixel.cpp.

unsigned char* scaleBuffer ( unsigned char *  image,
unsigned int *  w,
unsigned int *  h,
unsigned int  bpp 
)

Definition at line 87 of file pixel.cpp.