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

Merge branch 'refactor-opengl-api' into 'development'

Refactor opengl api

See merge request !98
parents 2e1956c9 a1f23eb3
......@@ -29,6 +29,7 @@
#include "tgt/glcanvas.h"
#include "tgt/glcontextmanager.h"
#include "tgt/gpucapabilities.h"
#include "tgt/opengljobprocessor.h"
#include "tgt/shadermanager.h"
#include "tgt/texturereadertga.h"
#include "tgt/qt/qtapplication.h"
......@@ -39,8 +40,6 @@
#include "application/gui/mainwindow.h"
#include "application/gui/mdi/mdidockablewindow.h"
#include "core/tools/job.h"
#include "core/tools/opengljobprocessor.h"
#include "core/tools/simplejobprocessor.h"
#include "core/tools/stringutils.h"
#include "core/tools/quadrenderer.h"
......@@ -74,9 +73,7 @@ namespace campvis {
sigslot::signal_manager::init();
sigslot::signal_manager::getRef().start();
_mainWindow = new MainWindow(this);
tgt::GlContextManager::init();
OpenGLJobProcessor::init();
SimpleJobProcessor::init();
QtJobProcessor::init();
......@@ -106,11 +103,11 @@ namespace campvis {
tgt::init(featureset);
LogMgr.getConsoleLog()->addCat("", true);
_mainWindow = new MainWindow(this);
// create a local OpenGL context and init GL
_localContext = new QtThreadedCanvas("", tgt::ivec2(16, 16));
tgt::GLContextScopedLock lock(_localContext);
tgt::GlContextManager::getRef().registerContextAndInitGlew(_localContext);
tgt::GlContextManager::getRef().registerContextAndInitGlew(_localContext, "Local Context");
tgt::initGL(featureset);
ShdrMgr.setDefaultGlslVersion("330");
......@@ -150,8 +147,6 @@ namespace campvis {
LERROR("Your system does not support GLSL Shader Version 3.30, which is mandatory. CAMPVis will probably not work as intended.");
}
GLJobProc.start();
GLJobProc.registerContext(_localContext);
// load textureData from file
tgt::TextureReaderTga trt;
......@@ -179,6 +174,7 @@ namespace campvis {
if (! _luaVmState->execString("inspect = require 'inspect'"))
LERROR("Error setting up Lua VM.");
#endif
GLCtxtMgr.releaseContext(_localContext, false);
// parse argument list and create pipelines
QStringList pipelinesToAdd = this->arguments();
......@@ -189,13 +185,19 @@ namespace campvis {
addPipeline(pipelinesToAdd[i].toStdString(), p);
}
GLJobProc.setContext(_localContext);
GLJobProc.start();
_initialized = true;
}
void CampVisApplication::deinit() {
tgtAssert(_initialized, "Tried to deinitialize uninitialized CampVisApplication.");
GLJobProc.stop();
// Stop all pipeline threads.
for (std::vector<PipelineRecord>::iterator it = _pipelines.begin(); it != _pipelines.end(); ++it) {
it->_pipeline->stop();
}
{
// Deinit everything OpenGL related using the local context.
......@@ -216,19 +218,20 @@ namespace campvis {
tgt::deinitGL();
}
tgt::GlContextManager::deinit();
tgt::deinit();
// MainWindow dtor needs a valid CampVisApplication, so we need to call it here instead of during destruction.
delete _mainWindow;
GLJobProc.stop();
OpenGLJobProcessor::deinit();
SimpleJobProcessor::deinit();
tgt::GlContextManager::deinit();
tgt::deinit();
PropertyWidgetFactory::deinit();
ImageRepresentationConverter::deinit();
PipelineFactory::deinit();
// MainWindow dtor needs a valid CampVisApplication, so we need to call it here instead of during destruction.
delete _mainWindow;
_initialized = false;
}
......@@ -236,7 +239,7 @@ namespace campvis {
tgtAssert(_initialized, "Tried to run uninitialized CampVisApplication.");
// disconnect OpenGL context from this thread so that the other threads can acquire an OpenGL context.
tgt::GlContextManager::getRef().releaseCurrentContext();
//tgt::GlContextManager::getRef().releaseCurrentContext();
_mainWindow->show();
......@@ -251,7 +254,6 @@ namespace campvis {
// create canvas and painter for the pipeline and connect all together
tgt::QtThreadedCanvas* canvas = new tgt::QtThreadedCanvas("CAMPVis", tgt::ivec2(512, 512));
GLJobProc.registerContext(canvas);
canvas->init();
CampVisPainter* painter = new CampVisPainter(canvas, pipeline);
......@@ -265,10 +267,7 @@ namespace campvis {
_pipelineWindows[pipeline] = _mainWindow->addVisualizationPipelineWidget(name, canvas);
// initialize context (GLEW) and pipeline in OpenGL thread)
GLJobProc.enqueueJob(
canvas,
makeJobOnHeap<CampVisApplication, tgt::GLCanvas*, AbstractPipeline*>(this, &CampVisApplication::initGlContextAndPipeline, canvas, pipeline),
OpenGLJobProcessor::SerialJob);
initGlContextAndPipeline(canvas, pipeline);
#ifdef CAMPVIS_HAS_SCRIPTING
if (! _luaVmState->injectObjectPointerToTable(pipeline, "campvis::AutoEvaluationPipeline *", "pipelines", static_cast<int>(_pipelines.size())))
......@@ -278,11 +277,13 @@ namespace campvis {
_luaVmState->execString("inspect(pipelines)");
#endif
GLCtxtMgr.releaseContext(canvas, false);
s_PipelinesChanged.emitSignal();
pipeline->start();
}
void CampVisApplication::initGlContextAndPipeline(tgt::GLCanvas* canvas, AbstractPipeline* pipeline) {
tgt::GlContextManager::getRef().registerContextAndInitGlew(canvas);
tgt::GlContextManager::getRef().registerContextAndInitGlew(canvas, pipeline->getName());
pipeline->init();
LGL_ERROR;
......@@ -311,11 +312,10 @@ namespace campvis {
void CampVisApplication::rebuildAllShadersFromFiles() {
// rebuilding all shaders has to be done from OpenGL context, use the local one.
GLJobProc.enqueueJob(_localContext, makeJobOnHeap(this, &CampVisApplication::triggerShaderRebuild), OpenGLJobProcessor::SerialJob);
GLJobProc.enqueueJob(makeJobOnHeap(this, &CampVisApplication::triggerShaderRebuild));
}
void CampVisApplication::triggerShaderRebuild() {
if (! ShdrMgr.rebuildAllShadersFromFile()) {
LERROR("Could not rebuild all shaders from file.");
return;
......
......@@ -26,6 +26,7 @@
#include "tgt/assert.h"
#include "tgt/camera.h"
#include "tgt/glcontextmanager.h"
#include "tgt/quadric.h"
#include "tgt/shadermanager.h"
#include "tgt/texture.h"
......@@ -37,8 +38,6 @@
#include "core/datastructures/renderdata.h"
#include "core/datastructures/imagerepresentationgl.h"
#include "core/pipeline/abstractpipeline.h"
#include "core/tools/job.h"
#include "core/tools/opengljobprocessor.h"
#include "core/tools/quadrenderer.h"
namespace campvis {
......@@ -50,8 +49,7 @@ namespace campvis {
, _copyShader(nullptr)
, _errorTexture(nullptr)
{
tgtAssert(getCanvas() != 0, "The given canvas must not be 0!");
_dirty = true;
tgtAssert(getCanvas() != nullptr, "The given canvas must not be 0!");
setPipeline(pipeline);
}
......@@ -60,7 +58,7 @@ namespace campvis {
}
void CampVisPainter::paint() {
if (getCanvas() == 0)
if (getCanvas() == nullptr)
return;
if (_copyShader == nullptr) {
......@@ -81,7 +79,7 @@ namespace campvis {
tgt::Shader::IgnoreUniformLocationErrorGuard guard(_copyShader);
// render whatever there is to render
if (rd != 0 || (repGL != 0 && repGL->getDimensionality() == 2)) {
if (rd != nullptr || (repGL != nullptr && repGL->getDimensionality() == 2)) {
_copyShader->setUniform("_viewMatrix", tgt::mat4::identity);
// bind input textures
......@@ -137,39 +135,33 @@ namespace campvis {
void CampVisPainter::deinit() {
ShdrMgr.dispose(_copyShader);
if (_pipeline != 0) {
_pipeline->s_renderTargetChanged.disconnect(this);
if (getCanvas()->getEventHandler() != 0)
if (_pipeline != nullptr) {
if (getCanvas()->getEventHandler() != nullptr)
getCanvas()->getEventHandler()->removeEventListener(_pipeline);
_pipeline = 0;
_pipeline = nullptr;
}
}
void CampVisPainter::setPipeline(AbstractPipeline* pipeline) {
tgtAssert(pipeline != 0, "The given pipeline must not be 0.");
if (_pipeline != 0) {
_pipeline->s_renderTargetChanged.disconnect(this);
if (getCanvas()->getEventHandler() != 0)
tgtAssert(pipeline != nullptr, "The given pipeline must not be 0.");
if (_pipeline != nullptr) {
if (getCanvas()->getEventHandler() != nullptr)
getCanvas()->getEventHandler()->removeEventListener(_pipeline);
}
_pipeline = pipeline;
_pipeline->s_renderTargetChanged.connect(this, &CampVisPainter::onRenderTargetChanged);
_pipeline->setRenderTargetSize(getCanvas()->getSize());
if (getCanvas()->getEventHandler() != 0)
if (getCanvas()->getEventHandler() != nullptr)
getCanvas()->getEventHandler()->addEventListenerToFront(_pipeline);
}
void CampVisPainter::repaint() {
GLJobProc.enqueueJob(getCanvas(), makeJobOnHeap(this, &CampVisPainter::paint), OpenGLJobProcessor::PaintJob);
}
void CampVisPainter::onRenderTargetChanged() {
repaint();
// do nothing, as the painting is entirely managed by the pipeline.
}
void CampVisPainter::setCanvas(tgt::GLCanvas* canvas) {
tgtAssert(dynamic_cast<tgt::QtThreadedCanvas*>(canvas) != 0, "Canvas must be of type QtThreadedCanvas!");
tgtAssert(dynamic_cast<tgt::QtThreadedCanvas*>(canvas) != nullptr, "Canvas must be of type QtThreadedCanvas!");
Painter::setCanvas(canvas);
}
......
......@@ -91,10 +91,6 @@ namespace campvis {
void setErrorTexture(tgt::Texture* texture);
/**
* Slot being notified when the pipeline's render target changed.
*/
void onRenderTargetChanged();
private:
/**
......@@ -106,10 +102,7 @@ namespace campvis {
AbstractPipeline* _pipeline; ///< Pipeline to render
tgt::Shader* _copyShader; ///< Shader for copying the render target to the framebuffer.
tbb::atomic<bool> _dirty; ///< Flag whether render result is dirty and needs to be rerendered.
std::condition_variable _renderCondition; ///< conditional wait condition for rendering
tgt::Texture* _errorTexture;
tgt::Texture* _errorTexture; ///< Pointer to error texture
};
}
......
......@@ -34,7 +34,6 @@
#include "core/datastructures/imagerepresentationgl.h"
#include "core/datastructures/facegeometry.h"
#include "core/datastructures/geometrydatafactory.h"
#include "core/tools/job.h"
#include "core/classification/tfgeometry1d.h"
#include "core/classification/geometry1dtransferfunction.h"
......@@ -67,15 +66,8 @@ namespace campvis {
{
static_cast<Geometry1DTransferFunction*>(p_transferFunction.getTF())->addGeometry(TFGeometry1D::createQuad(tgt::vec2(0.f, 1.f), tgt::col4(0, 0, 0, 255), tgt::col4(255, 255, 255, 255)));
makeCurrent();
// Init GLEW for this context
GLenum err = glewInit();
if (err != GLEW_OK) {
// Problem: glewInit failed, something is seriously wrong.
tgtAssert(false, "glewInit failed");
std::cerr << "glewInit failed, error: " << glewGetErrorString(err) << std::endl;
exit(EXIT_FAILURE);
}
GLCtxtMgr.registerContextAndInitGlew(this, "DataContainerInspector");
GLCtxtMgr.releaseContext(this, false);
addProperty(p_currentSlice);
addProperty(p_transferFunction);
......@@ -117,7 +109,6 @@ namespace campvis {
void DataContainerInspectorCanvas::init() {
initAllProperties();
GLJobProc.registerContext(this);
_paintShader = ShdrMgr.load("core/glsl/passthrough.vert", "application/glsl/datacontainerinspector.frag", "");
_paintShader->setAttributeLocation(0, "in_Position");
_paintShader->setAttributeLocation(1, "in_TexCoords");
......@@ -147,7 +138,8 @@ namespace campvis {
_textures.clear();
ShdrMgr.dispose(_paintShader);
delete _quad;
GLJobProc.deregisterContext(this);
GLCtxtMgr.removeContext(this);
}
QSize DataContainerInspectorCanvas::sizeHint() const {
......@@ -261,8 +253,11 @@ namespace campvis {
void DataContainerInspectorCanvas::invalidate() {
// only if inited
if (_quad != 0 && _paintShader != 0)
GLJobProc.enqueueJob(this, makeJobOnHeap(this, &DataContainerInspectorCanvas::paint), OpenGLJobProcessor::PaintJob);
if (_quad != 0 && _paintShader != 0) {
// TODO: check, whether this should be done in an extra thread
tgt::GLContextScopedLock lock(this);
paint();
}
}
void DataContainerInspectorCanvas::createQuad() {
......
......@@ -39,7 +39,6 @@
#include "core/properties/numericproperty.h"
#include "core/properties/propertycollection.h"
#include "core/properties/transferfunctionproperty.h"
#include "core/tools/opengljobprocessor.h"
#include "core/eventhandlers/trackballnavigationeventlistener.h"
#include "modules/base/processors/lightsourceprovider.h"
......
......@@ -35,9 +35,6 @@
#include <IL/ilu.h>
#endif
#include "core/tools/job.h"
#include "core/tools/opengljobprocessor.h"
#include "core/datastructures/abstractdata.h"
#include "core/datastructures/datacontainer.h"
#include "core/datastructures/facegeometry.h"
......@@ -467,10 +464,8 @@ namespace campvis {
if (! filename.isEmpty()) {
// Texture access needs OpenGL context - dispatch method call:
GLJobProc.enqueueJob(
_canvas,
makeJobOnHeap(&DataContainerInspectorWidget::saveToFile, handle, filename.toStdString()),
OpenGLJobProcessor::SerialJob);
tgt::GLContextScopedLock lock(_canvas);
saveToFile(handle, filename.toStdString());
}
}
}
......
......@@ -32,7 +32,6 @@
#include "application/gui/qtdatahandle.h"
#include "application/gui/datacontainerinspectorcanvas.h"
#include "application/gui/properties/propertycollectionwidget.h"
#include "core/tools/opengljobprocessor.h"
#include <QLabel>
#include <QWidget>
......
......@@ -36,7 +36,6 @@
#include "core/classification/tfgeometry1d.h"
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/properties/transferfunctionproperty.h"
#include "core/tools/opengljobprocessor.h"
#include <QCheckBox>
#include <QGridLayout>
......@@ -70,8 +69,6 @@ namespace campvis {
Geometry1DTransferFunctionEditor::~Geometry1DTransferFunctionEditor() {
disconnectFromTf();
if (OpenGLJobProcessor::isInited())
GLJobProc.deregisterContext(_canvas);
if (tgt::GlContextManager::isInited())
tgt::GlContextManager::getRef().removeContext(_canvas);
}
......@@ -177,9 +174,11 @@ namespace campvis {
}
void Geometry1DTransferFunctionEditor::sizeChanged(const tgt::ivec2& size) {
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<AbstractTFGeometryManipulator*>::iterator it = _manipulators.begin(); it != _manipulators.end(); ++it) {
(*it)->setViewportSize(size);
{
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<AbstractTFGeometryManipulator*>::iterator it = _manipulators.begin(); it != _manipulators.end(); ++it) {
(*it)->setViewportSize(size);
}
}
invalidate();
}
......@@ -220,7 +219,9 @@ namespace campvis {
}
void Geometry1DTransferFunctionEditor::invalidate() {
GLJobProc.enqueueJob(_canvas, makeJobOnHeap(this, &Geometry1DTransferFunctionEditor::paint), OpenGLJobProcessor::PaintJob);
// TODO: check, whether this should be done in an extra thread
tgt::GLContextScopedLock lock(_canvas);
paint();
}
void Geometry1DTransferFunctionEditor::setupGUI() {
......@@ -237,8 +238,8 @@ namespace campvis {
_layout->addWidget(lblOpacityBottom, 3, 0, 1, 1, Qt::AlignRight);
_canvas = new tgt::QtThreadedCanvas("", tgt::ivec2(256, 128), tgt::GLCanvas::RGBA_BUFFER, 0, false);
GLJobProc.registerContext(_canvas);
GLJobProc.enqueueJob(_canvas, makeJobOnHeap<tgt::GlContextManager, tgt::GLCanvas*>(tgt::GlContextManager::getPtr(), &tgt::GlContextManager::registerContextAndInitGlew, _canvas), OpenGLJobProcessor::SerialJob);
GLCtxtMgr.registerContextAndInitGlew(_canvas, "Geometry1DTransferFunctionEditor");
GLCtxtMgr.releaseContext(_canvas, false);
_canvas->setPainter(this, false);
_layout->addWidget(_canvas, 1, 1, 3, 3);
......@@ -275,7 +276,7 @@ namespace campvis {
_canvas->getEventHandler()->clearEventListeners();
for (std::vector<AbstractTFGeometryManipulator*>::iterator it = _manipulators.begin(); it != _manipulators.end(); ++it) {
if (WholeTFGeometryManipulator* tester = dynamic_cast<WholeTFGeometryManipulator*>(*it)) {
tester->s_selected.disconnect(this);
tester->s_selected.disconnect(this);
}
delete *it;
}
......
......@@ -36,7 +36,6 @@
#include "core/classification/tfgeometry2d.h"
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/properties/transferfunctionproperty.h"
#include "core/tools/opengljobprocessor.h"
#include <QGridLayout>
#include <QLabel>
......@@ -63,8 +62,6 @@ namespace campvis {
Geometry2DTransferFunctionEditor::~Geometry2DTransferFunctionEditor() {
disconnectFromTf();
if (OpenGLJobProcessor::isInited())
GLJobProc.deregisterContext(_canvas);
if (tgt::GlContextManager::isInited())
tgt::GlContextManager::getRef().removeContext(_canvas);
}
......@@ -161,9 +158,11 @@ namespace campvis {
}
void Geometry2DTransferFunctionEditor::sizeChanged(const tgt::ivec2& size) {
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<AbstractTFGeometryManipulator*>::iterator it = _manipulators.begin(); it != _manipulators.end(); ++it) {
(*it)->setViewportSize(size);
{
tbb::mutex::scoped_lock lock(_localMutex);
for (std::vector<AbstractTFGeometryManipulator*>::iterator it = _manipulators.begin(); it != _manipulators.end(); ++it) {
(*it)->setViewportSize(size);
}
}
invalidate();
}
......@@ -198,7 +197,9 @@ namespace campvis {
}
void Geometry2DTransferFunctionEditor::invalidate() {
GLJobProc.enqueueJob(_canvas, makeJobOnHeap(this, &Geometry2DTransferFunctionEditor::paint), OpenGLJobProcessor::PaintJob);
// TODO: check, whether this should be done in an extra thread
tgt::GLContextScopedLock lock(_canvas);
paint();
}
void Geometry2DTransferFunctionEditor::setupGUI() {
......@@ -215,8 +216,8 @@ namespace campvis {
_layout->addWidget(lblOpacityBottom, 3, 0, 1, 1, Qt::AlignRight);
_canvas = new tgt::QtThreadedCanvas("", tgt::ivec2(256, 128), tgt::GLCanvas::RGBA_BUFFER, 0, false);
GLJobProc.registerContext(_canvas);
GLJobProc.enqueueJob(_canvas, makeJobOnHeap<tgt::GlContextManager, tgt::GLCanvas*>(tgt::GlContextManager::getPtr(), &tgt::GlContextManager::registerContextAndInitGlew, _canvas), OpenGLJobProcessor::SerialJob);
GLCtxtMgr.registerContextAndInitGlew(_canvas, "Geometry2DTransferFunctionEditor");
GLCtxtMgr.releaseContext(_canvas, false);
_canvas->setPainter(this, false);
_layout->addWidget(_canvas, 1, 1, 3, 3);
......
......@@ -28,7 +28,7 @@ namespace campvis {
QtJobProcessor::QtJobProcessor()
: QWidget()
{
connect(this, SIGNAL(newJobSignal(AbstractJob *)), this, SLOT(onJobArrived(AbstractJob *)));
connect(this, SIGNAL(newJobSignal(tgt::AbstractJob*)), this, SLOT(onJobArrived(tgt::AbstractJob*)));
}
QtJobProcessor::~QtJobProcessor()
......@@ -36,16 +36,16 @@ namespace campvis {
}
void QtJobProcessor::enqueueJob(AbstractJob * job) {
void QtJobProcessor::enqueueJob(tgt::AbstractJob* job) {
emit newJobSignal(job);
}
void QtJobProcessor::enqueueJob(std::function<void(void)> fn)
{
emit newJobSignal(makeJobOnHeap(fn));
emit newJobSignal(tgt::makeJobOnHeap(fn));
}
void QtJobProcessor::onJobArrived(AbstractJob * job)
void QtJobProcessor::onJobArrived(tgt::AbstractJob* job)
{
tgtAssert(job, "Job must not be null!");
......
......@@ -25,14 +25,13 @@
#ifndef QTJOBPROCESSOR_H__
#define QTJOBPROCESSOR_H__
#include "core/tools/job.h"
#include "tgt/job.h"
#include "tgt/singleton.h"
#include <QWidget>
#include <functional>
namespace campvis {
/**
* This job processor singleton can be used to execute jobs (asynchronously) from inside the Qt GUI thread.
* This can result in simpler and better understandable code when only a few lines of code need
......@@ -58,18 +57,18 @@ namespace campvis {
/**
Enqueues a new job to be processed by the job processor
*/
void enqueueJob(AbstractJob * job);
void enqueueJob(tgt::AbstractJob* job);
/**
Convenience function to simplify the code, removing the necessity for a makeJobOnHeap() call
*/
void enqueueJob(std::function<void(void)> fn);
signals:
void newJobSignal(AbstractJob * job);
signals:
void newJobSignal(tgt::AbstractJob* job);
private slots:
void onJobArrived(AbstractJob * job);
void onJobArrived(tgt::AbstractJob* job);
};
}
......
......@@ -28,8 +28,6 @@
#include "tgt/glcontextmanager.h"
#include "tgt/vertexarrayobject.h"
#include "core/tools/opengljobprocessor.h"
namespace campvis {
const std::string GeometryData::loggerCat_ = "CAMPVis.core.datastructures.GeometryData";;
......
......@@ -26,10 +26,6 @@
#include "tgt/assert.h"
#include "tgt/logmanager.h"
#include "tgt/glcontextmanager.h"
#include "core/tools/opengljobprocessor.h"
#include "core/tools/job.h"
namespace campvis {
......@@ -46,7 +42,7 @@ namespace campvis {
return nullptr;
}
OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
tgt::OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
ImageRepresentationGL* toReturn = ImageRepresentationGL::create(const_cast<ImageData*>(tester->getParent()), wtp);
switch (wtp._baseType) {
......@@ -79,7 +75,7 @@ namespace campvis {
return toReturn;
}
else if (const ImageRepresentationLocal* tester = dynamic_cast<const ImageRepresentationLocal*>(source)) {
OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
tgt::OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
ImageRepresentationGL* toReturn = ImageRepresentationGL::create(const_cast<ImageData*>(tester->getParent()), tester->getWeaklyTypedPointer());
return toReturn;
}
......@@ -97,7 +93,7 @@ namespace campvis {
return ImageRepresentationLocal::create(tester->getParent(), tester->getImageData());
}
else if (const ImageRepresentationGL* tester = dynamic_cast<const ImageRepresentationGL*>(source)) {
OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
tgt::OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
WeaklyTypedPointer wtp = tester->getWeaklyTypedPointerCopy();
if (wtp._pointer != nullptr)
return ImageRepresentationLocal::create(source->getParent(), wtp);
......
......@@ -25,8 +25,9 @@
#ifndef IMAGEREPRESENTATIONCONVERSIONCORE_H__