ARB
|
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glpng.h>
#include <stdlib.h>
#include <math.h>
#include <png.h>
Go to the source code of this file.
Macros | |
#define | GLPNG_CHECK_SIG(header, size) (png_sig_cmp(header,0,size)==0) |
#define | GET(o) ((int)*(data + (o))) |
#define | FORSTART |
#define | FOREND |
#define | ALPHA *q |
Functions | |
static unsigned char | DefaultAlphaCallback (unsigned char red, unsigned char green, unsigned char blue) |
static void | checkForGammaEnv () |
static int | SafeSize (int i) |
static void | Resize (int components, const png_bytep d1, int w1, int h1, png_bytep d2, int w2, int h2) |
static int | HalfSize (GLint components, GLint width, GLint height, const unsigned char *data, unsigned char *d, int filter) |
static void | Build2DMipmaps (GLint components, GLint width, GLint height, GLenum format, const unsigned char *data, int filter) |
static int APIENTRY | pngLoadF (FILE *fp, int mipmap, int trans, pngInfo *pinfo) |
static int APIENTRY | pngLoad (const char *filename, int mipmap, int trans, pngInfo *pinfo) |
static unsigned int | SetParams (int wrapst, int magfilter, int minfilter) |
unsigned int APIENTRY | pngBind (const char *filename, int mipmap, int trans, pngInfo *info, int wrapst, int minfilter, int magfilter) |
Variables | |
static unsigned char | StencilRed = 0 |
static unsigned char | StencilGreen = 0 |
static unsigned char | StencilBlue = 0 |
static unsigned char(* | AlphaCallback )(unsigned char red, unsigned char green, unsigned char blue) = DefaultAlphaCallback |
static int | StandardOrientation = 0 |
static int | PalettedTextures = -1 |
static GLint | MaxTextureSize = 0 |
static double | screenGamma = 2.2 / 1.0 |
static char | gammaExplicit = 0 |
#define GLPNG_CHECK_SIG | ( | header, | |
size | |||
) | (png_sig_cmp(header,0,size)==0) |
Definition at line 43 of file glpng.c.
Referenced by pngLoadF().
#define GET | ( | o | ) | ((int)*(data + (o))) |
Definition at line 148 of file glpng.c.
Referenced by HalfSize().
#define FORSTART |
Referenced by pngLoadF().
#define FOREND |
Referenced by pngLoadF().
#define ALPHA *q |
Referenced by pngLoadF().
|
static |
Definition at line 252 of file glpng.c.
References pngInfo::Alpha, ALPHA, AlphaCallback, Build2DMipmaps(), checkForGammaEnv(), pngInfo::Depth, FOREND, FORSTART, GLPNG_ALPHA, GLPNG_BLEND1, GLPNG_BLEND2, GLPNG_BLEND3, GLPNG_BLEND4, GLPNG_BLEND5, GLPNG_BLEND6, GLPNG_BLEND7, GLPNG_BUILDMIPMAPS, GLPNG_CALLBACK, GLPNG_CHECK_SIG, GLPNG_SIMPLEMIPMAPS, GLPNG_SOLID, GLPNG_STENCIL, pngInfo::Height, info, MaxTextureSize, Resize(), SafeSize(), screenGamma, StencilBlue, StencilGreen, StencilRed, and pngInfo::Width.
Referenced by pngLoad().
unsigned int APIENTRY pngBind | ( | const char * | filename, |
int | mipmap, | ||
int | trans, | ||
pngInfo * | info, | ||
int | wrapst, | ||
int | minfilter, | ||
int | magfilter | ||
) |
Definition at line 569 of file glpng.c.
References id, pngLoad(), and SetParams().
|
static |
Definition at line 56 of file glpng.c.
Referenced by pngLoadF().
|
static |
Definition at line 56 of file glpng.c.
Referenced by pngLoadF().
|
static |
Definition at line 56 of file glpng.c.
Referenced by pngLoadF().
|
static |
Definition at line 57 of file glpng.c.
Referenced by pngLoadF().
|
static |
Definition at line 67 of file glpng.c.
Referenced by pngLoadF(), and SafeSize().
|
static |
Definition at line 78 of file glpng.c.
Referenced by checkForGammaEnv(), and pngLoadF().