Add support for converting and rendering volumetric data in the cdf format. Replace DataConverter by a more general purpose TaskRunner.

Conflicts:
	modules/volume/CMakeLists.txt
	modules/volume/linearlrucache.h
	src/engine/openspaceengine.cpp
This commit is contained in:
Emil Axelsson
2016-10-24 10:26:00 +02:00
parent 99f265c1ed
commit cb7e81cf3d
53 changed files with 2161 additions and 122 deletions
@@ -47,7 +47,8 @@ namespace {
namespace openspace {
MultiresVolumeRaycaster::MultiresVolumeRaycaster(std::shared_ptr<TSP> tsp,
MultiresVolumeRaycaster::MultiresVolumeRaycaster(
std::shared_ptr<TSP> tsp,
std::shared_ptr<AtlasManager> atlasManager,
std::shared_ptr<TransferFunction> transferFunction)
: _tsp(tsp)
@@ -112,11 +113,9 @@ void MultiresVolumeRaycaster::preRaycast(const RaycastData& data, ghoul::opengl:
_atlasManager->textureAtlas().bind();
program.setUniform("textureAtlas_" + id, _atlasUnit->unitNumber());
_atlasMapBinding = std::make_unique<ghoul::opengl::BufferBinding<ghoul::opengl::bufferbinding::Buffer::ShaderStorage>>();
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, _atlasMapBinding->bindingNumber(), _atlasManager->atlasMapBuffer());
program.setSsboBinding("atlasMapBlock_" + id, _atlasMapBinding->bindingNumber());
program.setUniform("gridType_" + id, static_cast<int>(_tsp->header().gridType_));
program.setUniform("maxNumBricksPerAxis_" + id, static_cast<unsigned int>(_tsp->header().xNumBricks_));
@@ -155,7 +154,8 @@ bool MultiresVolumeRaycaster::cameraIsInside(const RenderData& data, glm::vec3&
}
void MultiresVolumeRaycaster::postRaycast(const RaycastData& data, ghoul::opengl::ProgramObject& program) {
// For example: release texture units
_textureUnit = nullptr;
_tfUnit = nullptr;
}
std::string MultiresVolumeRaycaster::getBoundsVsPath() const {