Merge fix

This commit is contained in:
Sebastian Piwell
2016-06-01 12:09:58 -04:00
22 changed files with 411 additions and 201 deletions
+19 -16
View File
@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2015 *
* Copyright (c) 2014-2016 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
@@ -61,6 +61,10 @@ DataSphere::DataSphere(const ghoul::Dictionary& dictionary)
addProperty(_backgroundValues);
addProperty(_transferFunctionsFile);
addProperty(_dataOptions);
_programName = "DataSphereProgram";
_vsPath = "${MODULE_ISWA}/shaders/datasphere_vs.glsl";
_fsPath = "${MODULE_ISWA}/shaders/datasphere_fs.glsl";
}
DataSphere::~DataSphere(){}
@@ -72,7 +76,6 @@ bool DataSphere::initialize(){
_dataProcessor = _group->dataProcessor();
auto groupEvent = _group->groupEvent();
groupEvent->subscribe(name(), "useLogChanged", [&](const ghoul::Dictionary& dict){
LDEBUG(name() + " Event useLogChanged");
_useLog.setValue(dict.value<bool>("useLog"));
@@ -250,7 +253,7 @@ bool DataSphere::updateTexture(){
}
bool DataSphere::readyToRender(){
bool DataSphere::readyToRender() const {
return (!_textures.empty());
bool ready = isReady();
@@ -326,19 +329,19 @@ void DataSphere::setUniformAndTextures(){
}
bool DataSphere::createShader(){
if (_shader == nullptr) {
// Plane Program
RenderEngine& renderEngine = OsEng.renderEngine();
_shader = renderEngine.buildRenderProgram(
"DataSphereProgram",
"${MODULE_ISWA}/shaders/datasphere_vs.glsl",
"${MODULE_ISWA}/shaders/datasphere_fs.glsl");
if (!_shader)
return false;
}
return true;
}
// bool DataSphere::createShader(){
// if (_shader == nullptr) {
// // Plane Program
// RenderEngine& renderEngine = OsEng.renderEngine();
// _shader = renderEngine.buildRenderProgram(
// "DataSphereProgram",
// "${MODULE_ISWA}/shaders/datasphere_vs.glsl",
// "${MODULE_ISWA}/shaders/datasphere_fs.glsl");
// if (!_shader)
// return false;
// }
// return true;
// }
void DataSphere::setTransferFunctions(std::string tfPath){
std::string line;