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

some minor clean-up and fixes

parent d74f0f09
......@@ -64,8 +64,6 @@ namespace campvis {
delete _texCoordsBuffer;
delete _colorsBuffer;
delete _normalsBuffer;
// std::vector<tgt::BufferObject*> buffers(_buffers, _buffers + NUM_BUFFERS);
// GLJobProc.enqueueJob(_context, makeJobOnHeap(&GeometryData::deleteBuffers, buffers), OpenGLJobProcessor::LowPriorityJob);
}
}
......@@ -81,8 +79,6 @@ namespace campvis {
delete _texCoordsBuffer;
delete _colorsBuffer;
delete _normalsBuffer;
// std::vector<tgt::BufferObject*> buffers(_buffers, _buffers + NUM_BUFFERS);
// GLJobProc.enqueueJob(_context, makeJobOnHeap(&GeometryData::deleteBuffers, buffers), OpenGLJobProcessor::LowPriorityJob);
}
_verticesBuffer = 0;
......
......@@ -38,6 +38,10 @@
namespace campvis {
/**
* Specialization of a StringProperty to specify the keys (string IDs) for DataHandles to read/write.
* Offers an additional DataAccessInfo flag whether processor will read or write from/to that ID.
*/
class DataNameProperty : public GenericProperty<std::string> {
public:
/**
......@@ -65,23 +69,7 @@ namespace campvis {
/**
<<<<<<< HEAD
* Connects this property with the given DataNameProperty \a reader.
* \param reader DataNameProperty to connect to, must be have read access.
*/
void connect(DataNameProperty* reader);
/**
* Disconnects this property from the given DataNameProperty \a reader.
* \param reader DataNameProperty to disconnect from, must be have read access.
*/
void disconnect(DataNameProperty* reader);
/**
* Returns the access info of this property defining whether processor will read or write.
=======
* Returns the access info of this property defining whether component will read or write.
>>>>>>> c4c5899... Refactored DataNameProperty: Got rid of issueWrite() and connect(). Automatic invalidation of connected (shared) DataNameProperties is now delegated to AutoEvaluationPipeline.
* \return _accessInfo
*/
DataAccessInfo getAccessInfo() const;
......
......@@ -55,21 +55,18 @@ namespace tgt {
// delete textures
if (! _texturesToDelete[backIndex].empty()) {
glDeleteTextures(static_cast<GLsizei>(_texturesToDelete[backIndex].size()), &(_texturesToDelete[backIndex].front()));
//LDEBUGC("tgt.OpenGLGarbageCollector", "Deleted " << _texturesToDelete[backIndex].size() << " Textures.");
_texturesToDelete[backIndex].clear();
}
// delete FBOs
if (! _fbosToDelete[backIndex].empty()) {
glDeleteFramebuffers(static_cast<GLsizei>(_fbosToDelete[backIndex].size()), &(_fbosToDelete[backIndex].front()));
//LDEBUGC("tgt.OpenGLGarbageCollector", "Deleted " << _fbosToDelete[backIndex].size() << " FBOs.");
_fbosToDelete[backIndex].clear();
}
// delete buffers
if (! _buffersToDelete[backIndex].empty()) {
glDeleteBuffers(static_cast<GLsizei>(_buffersToDelete[backIndex].size()), &(_buffersToDelete[backIndex].front()));
// LDEBUGC("tgt.OpenGLGarbageCollector", "Deleted " << _buffersToDelete[backIndex].size() << " Buffers.");
_buffersToDelete[backIndex].clear();
}
......
......@@ -168,7 +168,8 @@ namespace campvis {
_raycaster.p_outputImage.setValue(p_outputImage.getValue() + ".raycaster");
}
if (prop == &p_inputVolume) {
invalidate(SLICES_INVALID);
_raycaster.invalidate(VolumeRenderer::PG_INVALID);
invalidate(VR_INVALID | SLICES_INVALID);
}
VisualizationProcessor::onPropertyChanged(prop);
}
......
......@@ -50,6 +50,14 @@ namespace campvis {
*/
class VolumeRenderer : public VisualizationProcessor {
public:
/// Additional invalidation levels for this processor.
/// Not the most beautiful design though.
enum ProcessorInvalidationLevel {
PG_INVALID = 1 << 4,
EEP_INVALID = 1 << 5,
RAYCASTER_INVALID = 1 << 6
};
/**
* Constructs a new VolumeRenderer Processor
**/
......@@ -89,14 +97,6 @@ namespace campvis {
MetaProperty p_raycasterProps; ///< MetaProperty for properties of the raycasting processor
protected:
/// Additional invalidation levels for this processor.
/// Not the most beautiful design though.
enum ProcessorInvalidationLevel {
PG_INVALID = 1 << 4,
EEP_INVALID = 1 << 5,
RAYCASTER_INVALID = 1 << 6
};
/**
* Slot getting called when one of the observed processors got invalidated.
* Invalidates this meta-processor with the corresponding level.
......
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