rswinkle / oglsuperbible5

Automatically exported from code.google.com/p/oglsuperbible5
0 stars 0 forks source link

Chapter 8: FBO examples (NVidia) - with fix #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run FB0 examples from chapter 8 on NVidia drivers

What is the expected output? What do you see instead?
E.g. Reflection example, should see reflection on mirror. Instead, a blank 
(black) mirror is drawn.

What version of the product are you using? On what operating system?
OpenGL 3.0, NVIDIA 9300 M graphics card

Please provide any additional information below.

This can be solved by editing the FBO texture initialisation, from line 211 
onwards:
// Create the reflection texture
glGenTextures(1, &mirrorTexture);
glBindTexture(GL_TEXTURE_2D, mirrorTexture);
// ADD THE FOLLOWING TWO LINES:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );

OpenGL assumes mipmaps will be used for magnification and minification, these 
have not been created for the reflection texture. Alternative solution 
presumably to set up mipmaps, but would have to recreate these every time the 
reflection image changed.

Original issue reported on code.google.com by daniel.l...@gmail.com on 17 Nov 2011 at 11:26

GoogleCodeExporter commented 8 years ago
ps Problem found on Windows 7

Original comment by daniel.l...@gmail.com on 17 Nov 2011 at 11:27