mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-28 15:09:36 -06:00
Feature/thesis work merge (#566)
Web GUI from Klas Eskilson (three new modules: webgui, webbrowser and cefwebgui) Parallel connection refactorization Wormhole server added to the main repository Transfer function editor work from Cristoffer Särevall Update ghoul
This commit is contained in:
@@ -92,7 +92,7 @@ ghoul::opengl::Texture& TransferFunction::getTexture() {
|
||||
}
|
||||
|
||||
void TransferFunction::update() {
|
||||
if (_needsUpdate) {
|
||||
/* if (_needsUpdate) {
|
||||
if (hasExtension(_filepath, "txt")) {
|
||||
setTextureFromTxt();
|
||||
} else {
|
||||
@@ -103,14 +103,14 @@ void TransferFunction::update() {
|
||||
if (_tfChangedCallback) {
|
||||
_tfChangedCallback(*this);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void TransferFunction::setCallback(TfChangedCallback callback) {
|
||||
_tfChangedCallback = std::move(callback);
|
||||
}
|
||||
|
||||
void TransferFunction::setTextureFromTxt() {
|
||||
void TransferFunction::setTextureFromTxt(std::shared_ptr<ghoul::opengl::Texture> ptr) {
|
||||
std::ifstream in;
|
||||
in.open(_filepath.c_str());
|
||||
|
||||
@@ -204,6 +204,7 @@ void TransferFunction::setTextureFromTxt() {
|
||||
}
|
||||
|
||||
// no need to deallocate transferFunction. Ownership is transferred to the Texture.
|
||||
|
||||
_texture = std::make_unique<ghoul::opengl::Texture>(
|
||||
transferFunction,
|
||||
glm::size3_t(width, 1, 1),
|
||||
|
||||
Reference in New Issue
Block a user