mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-26 14:08:53 -05:00
Merge branch 'feature/volume-tools' into thesis/2018/mas-model
This commit is contained in:
@@ -47,7 +47,8 @@ namespace openspace::volume {
|
||||
|
||||
BasicVolumeRaycaster::BasicVolumeRaycaster(
|
||||
std::shared_ptr<ghoul::opengl::Texture> volumeTexture,
|
||||
std::shared_ptr<TransferFunction> transferFunction,
|
||||
std::shared_ptr<openspace::TransferFunction> transferFunction,
|
||||
|
||||
std::shared_ptr<VolumeClipPlanes> clipPlanes)
|
||||
: _volumeTexture(volumeTexture)
|
||||
, _transferFunction(transferFunction)
|
||||
@@ -113,7 +114,6 @@ void BasicVolumeRaycaster::preRaycast(
|
||||
const RaycastData& data,
|
||||
ghoul::opengl::ProgramObject& program)
|
||||
{
|
||||
|
||||
if (!_volumeTexture || !_transferFunction) {
|
||||
return;
|
||||
}
|
||||
@@ -123,11 +123,10 @@ void BasicVolumeRaycaster::preRaycast(
|
||||
|
||||
std::string id = std::to_string(data.id);
|
||||
|
||||
_transferFunction->update();
|
||||
_tfUnit = std::make_unique<ghoul::opengl::TextureUnit>();
|
||||
_tfUnit->activate();
|
||||
|
||||
_transferFunction->getTexture().bind();
|
||||
// LINFOC("PRERAYCAST", "hello");
|
||||
|
||||
program.setUniform("transferFunction_" + id, _tfUnit->unitNumber());
|
||||
|
||||
@@ -188,7 +187,7 @@ std::string BasicVolumeRaycaster::getHelperPath() const {
|
||||
|
||||
|
||||
void BasicVolumeRaycaster::setTransferFunction(
|
||||
std::shared_ptr<TransferFunction> transferFunction)
|
||||
std::shared_ptr<openspace::TransferFunction> transferFunction)
|
||||
{
|
||||
_transferFunction = transferFunction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user