mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 17:30:04 -05:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user