This easy sample demonstrates how to introduce High Dynamic Range rendering, or HDR for short, into any scene. HDR is a lighting procedure designed to emulate, and capture, the increased lighting levels and contrast ratios experienced in the real world. Thus HDR involves the use of a wider dynamic range than usual. More simply, in HDR each pixel is not limited to the traditional range [0, 1]. However, since traditional display devices are still bounded by [0, 1] we use the concept of Tone Mapping to allow a HDR color to be mapped to a Low Dynamic Range in order to be displayed.
glGenTextures, glBindTexture, glTexImage2D,
glTexParameteri, glBindTexture, glGenRenderbuffersEXT,
glBindRenderbufferEXT, glRenderbufferStorageEXT, glBindFramebufferEXT,
glCreateShaderObjectARB, glShaderSourceARB, glCompileShaderARB,
glAttachObjectARB, glGetObjectParameterivARB, glGetInfoLogARB,
glUseProgramObjectARB, glGetUniformLocationARB, glUniform3fvARB,
glDeleteObjectARB, glDeleteTextures, glDeleteFramebuffersEXT,
glViewport, glMatrixMode, glLoadIdentity, gluPerspective, glBegin,
glTexCoord2i, glVertex2i, glEnd, glActiveTexture, glDisable.