Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

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

Renamed TumVisPainter to CampVisPainter

parent 1a7539f2
......@@ -78,7 +78,7 @@ namespace campvis {
tgtAssert(_initialized == false, "Destructing initialized CampVisApplication, deinitialize first!");
// delete everything in the right order:
for (std::vector< std::pair<VisualizationPipeline*, TumVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
for (std::vector< std::pair<VisualizationPipeline*, CampVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
delete it->second;
}
for (std::vector<AbstractPipeline*>::iterator it = _pipelines.begin(); it != _pipelines.end(); ++it) {
......@@ -167,7 +167,7 @@ namespace campvis {
}
// Now init painters:
for (std::vector< std::pair<VisualizationPipeline*, TumVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
for (std::vector< std::pair<VisualizationPipeline*, CampVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
it->second->init();
}
......@@ -190,7 +190,7 @@ namespace campvis {
}
// Now deinit painters:
for (std::vector< std::pair<VisualizationPipeline*, TumVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
for (std::vector< std::pair<VisualizationPipeline*, CampVisPainter*> >::iterator it = _visualizations.begin(); it != _visualizations.end(); ++it) {
it->second->deinit();
}
......@@ -253,7 +253,7 @@ namespace campvis {
_mainWindow->addVisualizationPipelineWidget(name, canvas);
canvas->init();
TumVisPainter* painter = new TumVisPainter(canvas, vp);
CampVisPainter* painter = new CampVisPainter(canvas, vp);
canvas->setPainter(painter, false);
_visualizations.push_back(std::make_pair(vp, painter));
......
......@@ -45,7 +45,7 @@ namespace tgt {
namespace campvis {
class AbstractPipeline;
class MainWindow;
class TumVisPainter;
class CampVisPainter;
class VisualizationPipeline;
/**
......@@ -132,7 +132,7 @@ namespace campvis {
/// All pipelines (incuding VisualizationPipelines)
std::vector<AbstractPipeline*> _pipelines;
/// All visualisations (i.e. VisualizationPipelines with their corresponding painters/canvases)
std::vector< std::pair<VisualizationPipeline*, TumVisPainter*> > _visualizations;
std::vector< std::pair<VisualizationPipeline*, CampVisPainter*> > _visualizations;
/// A local OpenGL context used for initialization
tgt::QtThreadedCanvas* _localContext;
......
......@@ -47,9 +47,9 @@
#include "core/tools/quadrenderer.h"
namespace campvis {
const std::string TumVisPainter::loggerCat_ = "CAMPVis.core.TumVisPainter";
const std::string CampVisPainter::loggerCat_ = "CAMPVis.core.CampVisPainter";
TumVisPainter::TumVisPainter(tgt::GLCanvas* canvas, VisualizationPipeline* pipeline)
CampVisPainter::CampVisPainter(tgt::GLCanvas* canvas, VisualizationPipeline* pipeline)
: Runnable()
, tgt::Painter(canvas)
, _pipeline(0)
......@@ -60,11 +60,11 @@ namespace campvis {
setPipeline(pipeline);
}
TumVisPainter::~TumVisPainter() {
CampVisPainter::~CampVisPainter() {
}
void TumVisPainter::stop() {
void CampVisPainter::stop() {
// we need to execute run() one more time to ensure correct release of the OpenGL context
_stopExecution = true;
_renderCondition.notify_all();
......@@ -72,7 +72,7 @@ namespace campvis {
Runnable::stop();
}
void TumVisPainter::run() {
void CampVisPainter::run() {
std::unique_lock<tbb::mutex> lock(CtxtMgr.getGlMutex());
while (! _stopExecution) {
......@@ -89,7 +89,7 @@ namespace campvis {
CtxtMgr.releaseCurrentContext();
}
void TumVisPainter::paint() {
void CampVisPainter::paint() {
if (getCanvas() == 0)
return;
......@@ -150,11 +150,11 @@ namespace campvis {
getCanvas()->swap();
}
void TumVisPainter::sizeChanged(const tgt::ivec2& size) {
void CampVisPainter::sizeChanged(const tgt::ivec2& size) {
_pipeline->setRenderTargetSize(size);
}
void TumVisPainter::init() {
void CampVisPainter::init() {
try {
// TODO: Remove hardcoded paths, and use ShdrMgr.addPath() at some central location
_copyShader = ShdrMgr.loadSeparate("core/glsl/passthrough.vert", "core/glsl/copyimage.frag", "", false);
......@@ -164,7 +164,7 @@ namespace campvis {
}
}
void TumVisPainter::deinit() {
void CampVisPainter::deinit() {
ShdrMgr.dispose(_copyShader);
if (_pipeline != 0) {
......@@ -175,7 +175,7 @@ namespace campvis {
}
}
void TumVisPainter::setPipeline(VisualizationPipeline* pipeline) {
void CampVisPainter::setPipeline(VisualizationPipeline* pipeline) {
tgtAssert(pipeline != 0, "The given pipeline must not be 0.");
if (_pipeline != 0) {
_pipeline->s_renderTargetChanged.disconnect(this);
......@@ -184,21 +184,21 @@ namespace campvis {
}
_pipeline = pipeline;
_pipeline->s_renderTargetChanged.connect(this, &TumVisPainter::onRenderTargetChanged);
_pipeline->s_renderTargetChanged.connect(this, &CampVisPainter::onRenderTargetChanged);
_pipeline->setRenderTargetSize(getCanvas()->getSize());
if (getCanvas()->getEventHandler() != 0)
getCanvas()->getEventHandler()->addEventListenerToFront(_pipeline);
}
void TumVisPainter::repaint() {
GLJobProc.enqueueJob(getCanvas(), makeJobOnHeap(this, &TumVisPainter::paint), OpenGLJobProcessor::PaintJob);
void CampVisPainter::repaint() {
GLJobProc.enqueueJob(getCanvas(), makeJobOnHeap(this, &CampVisPainter::paint), OpenGLJobProcessor::PaintJob);
}
void TumVisPainter::onRenderTargetChanged() {
void CampVisPainter::onRenderTargetChanged() {
repaint();
}
void TumVisPainter::setCanvas(tgt::GLCanvas* canvas) {
void CampVisPainter::setCanvas(tgt::GLCanvas* canvas) {
tgtAssert(dynamic_cast<tgt::QtThreadedCanvas*>(canvas) != 0, "Canvas must be of type QtThreadedCanvas!");
Painter::setCanvas(canvas);
}
......
......@@ -55,19 +55,19 @@ namespace campvis {
*
* \sa Runnable, VisualizationPipeline
*/
class TumVisPainter : public Runnable, public tgt::Painter, public sigslot::has_slots<> {
class CampVisPainter : public Runnable, public tgt::Painter, public sigslot::has_slots<> {
public:
/**
* Creates a new TumVisPainter rendering the render target of \a pipeline on \a canvas.
* Creates a new CampVisPainter rendering the render target of \a pipeline on \a canvas.
* \param canvas Canvas to render on
* \param pipeline Pipeline to render
*/
TumVisPainter(tgt::GLCanvas* canvas, VisualizationPipeline* pipeline);
CampVisPainter(tgt::GLCanvas* canvas, VisualizationPipeline* pipeline);
/**
* Destructor, stops and waits for the rendering thread if it's still running.
*/
virtual ~TumVisPainter();
virtual ~CampVisPainter();
/// \see Runnable::stop
void stop();
......
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