GLUS
Functions
glus_image_hdr.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSboolean GLUSAPIENTRY glusImageCreateHdr (GLUShdrimage *hdrimage, GLUSint width, GLUSint height, GLUSint depth, GLUSenum format)
 Creates a HDR image. More...
 
GLUSAPI GLUSboolean GLUSAPIENTRY glusImageLoadHdr (const GLUSchar *filename, GLUShdrimage *hdrimage)
 Loads a HDR file. More...
 
GLUSAPI GLUSboolean GLUSAPIENTRY glusImageSaveHdr (const GLUSchar *filename, const GLUShdrimage *hdrimage)
 Saves a HDR file. More...
 
GLUSAPI GLUSvoid GLUSAPIENTRY glusImageDestroyHdr (GLUShdrimage *hdrimage)
 Destroys the content of a HDR structure. More...
 
GLUSAPI 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

GLUSAPI 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.
GLUSAPI 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.
GLUSAPI 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.
GLUSAPI 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.
GLUSAPI 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.