Made night texture only be loaded if one exists, added new shader for planets with a night texture.

Also added plane & image plane shader programs to the general shader declaration in scene.cpp
This commit is contained in:
Anton Arbring
2015-04-22 15:41:55 -04:00
parent fd99115b6b
commit bc591b2bdb
8 changed files with 212 additions and 49 deletions
+30 -1
View File
@@ -183,6 +183,7 @@ bool Scene::initialize() {
tmpProgram->setProgramObjectCallback(cb);
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("fboPassProgram", tmpProgram);
// projection program
tmpProgram = ProgramObject::Build("projectiveProgram",
"${SHADERS}/projectiveTexture_vs.glsl",
@@ -202,7 +203,17 @@ bool Scene::initialize() {
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("pscShader", tmpProgram);
// pscstandard
// Night texture program
tmpProgram = ProgramObject::Build("nightTextureProgram",
"${SHADERS}/nighttexture_vs.glsl",
"${SHADERS}/nighttexture_fs.glsl");
if (!tmpProgram) return false;
tmpProgram->setProgramObjectCallback(cb);
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("nightTextureProgram", tmpProgram);
// Fov Program
tmpProgram = ProgramObject::Build("FovProgram",
"${SHADERS}/fov_vs.glsl",
"${SHADERS}/fov_fs.glsl");
@@ -211,6 +222,24 @@ bool Scene::initialize() {
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("FovProgram", tmpProgram);
// Plane Program
tmpProgram = ProgramObject::Build("planeProgram",
"${SHADERS}/modules/plane/plane_vs.glsl",
"${SHADERS}/modules/plane/plane_fs.glsl");
if (!tmpProgram) return false;
tmpProgram->setProgramObjectCallback(cb);
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("planeProgram", tmpProgram);
// Image Plane Program
tmpProgram = ProgramObject::Build("imagePlaneProgram",
"${SHADERS}/modules/imageplane/imageplane_vs.glsl",
"${SHADERS}/modules/imageplane/imageplane_fs.glsl");
if (!tmpProgram) return false;
tmpProgram->setProgramObjectCallback(cb);
_programs.push_back(tmpProgram);
OsEng.ref().configurationManager()->setValue("imagePlaneProgram", tmpProgram);
// RaycastProgram
tmpProgram = ProgramObject::Build("RaycastProgram",
"${SHADERS}/exitpoints.vert",