You can change line 291 in hdr_msaa.cpp from
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, hdrTextures[0], 0);
to
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, hdrTextures[0], 0);
this solves the incompleteness issue.
Strangely none of the fbo samples call
GLenum status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
if(status == GL_FRAMEBUFFER_COMPLETE)
printf("FBO setup ok.");
else
printf("FBO error.");
to check the framebuffer completeness.
The block redux sample does not work because the pixAttribs array given in source code is wrong (it is correct in book). In code it is given as
// Specify the important attributes we care about
int pixAttribs[] = { WGL_SUPPORT_OPENGL_ARB, 1, // Must support OGL rendering
WGL_DRAW_TO_WINDOW_ARB, 1, // pf that can run a window
WGL_ACCELERATION_ARB, 1, // must be HW accelerated
WGL_RED_BITS_ARB, 8, // 8 bits of red precision in window
WGL_GREEN_BITS_ARB, 8, // 8 bits of green precision in window
WGL_BLUE_BITS_ARB, 8, // 8 bits of blue precision in window
WGL_DEPTH_BITS_ARB, 16, // 16 bits of depth precision for window
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, // pf should be RGBA type
0}; // NULL termination
when it should be this
int pixAttribs[] = { WGL_SUPPORT_OPENGL_ARB, 1, // Must support OGL rendering
WGL_DRAW_TO_WINDOW_ARB, 1, // pf that can run a window
WGL_RED_BITS_ARB, 8, // 8 bits of red precision in window
WGL_GREEN_BITS_ARB, 8, // 8 bits of green precision in window
WGL_BLUE_BITS_ARB, 8, // 8 bits of blue precision in window
WGL_DEPTH_BITS_ARB, 16, // 16 bits of depth precision for window
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, // pf should be RGBA type
0}; // NULL termination
I have build all of the samples with success I will update the info on the svn googlecodes site.