diff options
author | Mathias Froehlich <Mathias.Froehlich@web.de> | 2011-01-31 21:55:32 +0100 |
---|---|---|
committer | Mathias Froehlich <Mathias.Froehlich@web.de> | 2011-01-31 21:55:32 +0100 |
commit | e81a42dd0301d1e14f9bd54d1eb4f1fda6475df4 (patch) | |
tree | ae34841c80a9aa4a007b8b53225d21f16f8060ec | |
parent | d26d8c3e473aa3b0a91ea8a51d2e9b8757871341 (diff) |
x
-rw-r--r-- | Main.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -271,6 +271,18 @@ void precompute() glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA16F_ARB, RES_MU_S * RES_NU, RES_MU, RES_R, 0, GL_RGB, GL_FLOAT, NULL);
free(pixels);
+ vector<string> files;
+ files.clear();
+ files.push_back("Main.h");
+ files.push_back("common.glsl");
+ files.push_back("earth.glsl");
+ drawProg = loadProgram(files);
+ glUseProgram(drawProg);
+ glUniform1i(glGetUniformLocation(drawProg, "reflectanceSampler"), reflectanceUnit);
+ // glUniform1i(glGetUniformLocation(drawProg, "transmittanceSampler"), transmittanceUnit);
+ glUniform1i(glGetUniformLocation(drawProg, "irradianceSampler"), irradianceUnit);
+ glUniform1i(glGetUniformLocation(drawProg, "inscatterSampler"), inscatterUnit);
+
#else
glActiveTexture(GL_TEXTURE0 + transmittanceUnit);
@@ -555,9 +567,9 @@ void precompute() fclose(f);
free(pixels);
#endif
-#endif
glUseProgram(drawProg);
+#endif
}
void recompute()
|