sidshekar / oglsuperbible5

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

Chapter 6 - Dissolve - won't load the texture. #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile the program (Dissolve - Chapter 6)
2. Run the program
3.

What is the expected output? What do you see instead?
I should see a "melting torus". I see a black window.

What version of the product are you using? On what operating system?
revision 193. Running Linux Ubuntu 11.04 desktop 64bit.

Please provide any additional information below.

The problem is that the program doesn't use the texture. The problem is in the 
line 143 of Dissolve.cpp file. It should be
                glUniform1i(locTexture, 0);
instead is
                glUniform1i(locTexture, 1);

So the fragment shader cannot use the texture and uses instead a null vector 
all the time. When comparing the texture color value (that is 0 0 0 0) to the 
dissolveFactor, the comparison is always false, so the fragment goes on discard 
for every pixel all the time. The result is a black window.

Original issue reported on code.google.com by matteo....@gmail.com on 22 Aug 2011 at 12:43