GLUS
Functions
glus_image_hdr.c File Reference
#include "GL/glus.h"

Functions

GLUSvoid _glusImageGatherSamplePoints (GLUSint sampleIndex[4], GLUSfloat sampleWeight[2], const GLUSfloat st[2], GLUSint width, GLUSint height, GLUSint stride)
 
GLUSboolean _glusFileCheckRead (FILE *f, size_t actualRead, size_t expectedRead)
 
GLUSboolean _glusFileCheckWrite (FILE *f, size_t actualWrite, size_t expectedWrite)
 
GLUSboolean GLUSAPIENTRY glusImageCreateHdr (GLUShdrimage *hdrimage, GLUSint width, GLUSint height, GLUSint depth, GLUSenum format)
 Creates a HDR image. More...
 
GLUSboolean GLUSAPIENTRY glusImageLoadHdr (const GLUSchar *filename, GLUShdrimage *hdrimage)
 Loads a HDR file. More...
 
GLUSboolean GLUSAPIENTRY glusImageSaveHdr (const GLUSchar *filename, const GLUShdrimage *hdrimage)
 Saves a HDR file. More...
 
GLUSvoid GLUSAPIENTRY glusImageDestroyHdr (GLUShdrimage *hdrimage)
 Destroys the content of a HDR structure. More...
 
GLUSboolean GLUSAPIENTRY glusImageSampleHdr2D (GLUSfloat rgb[3], const GLUShdrimage *hdrimage, const GLUSfloat st[2])
 Samples a RGB color value from a HDR 2D image. More...
 

Function Documentation

GLUSboolean _glusFileCheckRead ( FILE *  f,
size_t  actualRead,
size_t  expectedRead 
)
GLUSboolean _glusFileCheckWrite ( FILE *  f,
size_t  actualWrite,
size_t  expectedWrite 
)
GLUSvoid _glusImageGatherSamplePoints ( GLUSint  sampleIndex[4],
GLUSfloat  sampleWeight[2],
const GLUSfloat  st[2],
GLUSint  width,
GLUSint  height,
GLUSint  stride 
)
GLUSboolean GLUSAPIENTRY glusImageCreateHdr ( GLUShdrimage hdrimage,
GLUSint  width,
GLUSint  height,
GLUSint  depth,
GLUSenum  format 
)

Creates a HDR image.

Parameters
hdrimageThe structure to fill the HDR data.
widthWidth of the image.
heightHeight of the image.
depthDepth of the image.
formatFormat of the image.
Returns
GLUS_TRUE, if creating succeeded.
GLUSvoid GLUSAPIENTRY glusImageDestroyHdr ( GLUShdrimage hdrimage)

Destroys the content of a HDR structure.

Has to be called for freeing the resources.

Parameters
hdrimageThe HDR file structure.
GLUSboolean GLUSAPIENTRY glusImageLoadHdr ( const GLUSchar filename,
GLUShdrimage hdrimage 
)

Loads a HDR file.

Parameters
filenameThe name of the file to load.
hdrimageThe structure to fill the HDR data.
Returns
GLUS_TRUE, if loading succeeded.
GLUSboolean GLUSAPIENTRY glusImageSampleHdr2D ( GLUSfloat  rgb[3],
const GLUShdrimage hdrimage,
const GLUSfloat  st[2] 
)

Samples a RGB color value from a HDR 2D image.

Sampling uses a bilinear filter.

Parameters
rgbThe resulting, sampled RGB color value.
hdrimageThe HDR image structure, containing the 2D texel data.
stTexture coordinate, where to sample the 2D texture.
Returns
GLUS_TRUE, if sampling succeeded.
GLUSboolean GLUSAPIENTRY glusImageSaveHdr ( const GLUSchar filename,
const GLUShdrimage hdrimage 
)

Saves a HDR file.

Parameters
filenameThe name of the file to save.
hdrimageThe structure with the HDR data.
Returns
GLUS_TRUE, if saving succeeded.