The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit f211c483 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

cleaned up AbstractTransferFunction class

parent eb40f70e
......@@ -59,7 +59,6 @@ namespace campvis {
tgtAssert(shader != 0, "Shader must not be 0.");
{
// TODO: lock here or in createTexture?
tbb::mutex::scoped_lock lock(_localMutex);
if (_texture == 0 || _dirtyTexture) {
shader->deactivate();
......@@ -88,16 +87,7 @@ namespace campvis {
shader->setIgnoreUniformLocationError(tmp);
}
void AbstractTransferFunction::uploadTexture() {
{
tbb::mutex::scoped_lock lock(_localMutex);
if (_texture == 0 || _dirtyTexture) {
createTexture();
}
}
}
void AbstractTransferFunction::setIntensityDomain(const tgt::vec2& newDomain) {
tgtAssert(newDomain.x <= newDomain.y, "Intensity domain is not a valid interval.");
{
......@@ -113,7 +103,6 @@ namespace campvis {
}
const tgt::Texture* AbstractTransferFunction::getTexture() {
// TODO: lock here or in createTexture?
{
tbb::mutex::scoped_lock lock(_localMutex);
if (_texture == 0 || _dirtyTexture) {
......
......@@ -55,8 +55,6 @@ namespace campvis {
* b) All OpenGL-related methods must be called by a thread with a valid and locked OpenGL
* context. Even though other internals might be changed meanwhile, this ensures that
* the OpenGL stuff (e.g. the texture) stays valid for this time.
*
* \todo Check thread-safety, the private local lock is probably not the best design.
*/
class AbstractTransferFunction {
public:
......@@ -101,12 +99,6 @@ namespace campvis {
*/
void bind(tgt::Shader* shader, const tgt::TextureUnit& texUnit, const std::string& transFuncUniform = "_transferFunction", const std::string& transFuncParamsUniform = "_transferFunctionParams");
/**
* Creates the OpenGL texture.
* \note Calling thread must have a valid OpenGL context.
*/
void uploadTexture();
/**
* Sets the intensity domain where the transfer function is mapped to during classification.
* \param newDomain new intensity domain
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment