OpenCL fix in ghoul

This commit is contained in:
Hans-Christian Helltegen
2014-04-22 16:45:37 -04:00
parent ea8f7748ac
commit e027179f57
+12 -11
View File
@@ -166,7 +166,7 @@ ghoul::opengl::Texture* RenderableVolume::loadTransferFunction(const std::string
// check if not a txt based texture
if ( ! hasEnding(filepath, ".txt")) {
return ghoul::opengl::loadTexture(f);
return ghoul::opengl::loadTexture(f);;
}
// it is a txt based texture
@@ -236,7 +236,7 @@ ghoul::opengl::Texture* RenderableVolume::loadTransferFunction(const std::string
for(auto key: mappingKeys) {
glm::vec4 rgba = key.color;
LDEBUG("i: " << key.position << ", rgba: (" << rgba[0] << ", " << rgba[1] << ", " << rgba[2] << ", " << rgba[3] << ")");
// LDEBUG("i: " << key.position << ", rgba: (" << rgba[0] << ", " << rgba[1] << ", " << rgba[2] << ", " << rgba[3] << ")");
}
// allocate new float array with zeros
@@ -296,15 +296,16 @@ ghoul::opengl::Texture* RenderableVolume::loadTransferFunction(const std::string
//LDEBUG("["<< position <<"] " << value);
}
LDEBUG(weight << ", (" <<
transferFunction[4*i+0] << ", " <<
transferFunction[4*i+1] << ", " <<
transferFunction[4*i+2] << ", " <<
transferFunction[4*i+3] << ")");
// LDEBUG(weight << ", (" <<
// transferFunction[4*i+0] << ", " <<
// transferFunction[4*i+1] << ", " <<
// transferFunction[4*i+2] << ", " <<
// transferFunction[4*i+3] << ")");
}
return new ghoul::opengl::Texture(transferFunction, glm::size3_t(width,1,1),ghoul::opengl::Texture::Format::RGBA, GL_RGBA, GL_FLOAT);
return new ghoul::opengl::Texture(transferFunction,
glm::size3_t(width,1,1),ghoul::opengl::Texture::Format::RGBA,
GL_RGBA, GL_FLOAT);;
}
} // namespace openspace
} // namespace openspace