• Christian Schulte zu Berge's avatar
    Started refactoring the CAMPVis OpenGL Wrapping API: · 58512d30
    Christian Schulte zu Berge authored
    The new OpenGL wrapping API allows for full multi-threaded access to OpenGL contexts. Instead of one single thread scheduling all OpenGL jobs for all contexts, the new GlContextManager allows for OpenGL access from multiple threads while ensuring that each OpenGL context is acquired by only one thread at a time.
    
    Detailed list of changes:
    * tgt::GlContextManager keeping track of which threads acquire which OpenGL contexts and which threads currently have a context acquired.
    * OpenGLJobProcessor does no longer schedules and execute the OpenGL calls for all existing contexts, but only for one single context that can be used for background tasks or other jobs that explicitly need a valid OpenGL context.
    * AbstractPipeline now implements the Runnable interface and thus runs in it's own thread. This thread also owns the pipeline's OpenGL context.
    * AbstractPipeline has a new pure virtual method executePipeline() that has to perform all computations done by the pipeline.
    * AbstractPipeline now takes directly care of calling Painter::paint() of the pipeline's canvas (instead of signalling the Painter). However, the Painter interface needs further cleanup.
    * AutoEvaluationPipeline was adapted to the new AbstractPipeline API, hence executing processors is no longer delegated to the OpenGLJobProcessor or the SimpleJobProcessor but entirely done in AutoEvaluationPipeline::executePipeline() and thus in the pipeline's thread.
    * Adjusted CampVisApplication, DataContainerInspectorWidget, and GeometryTransferFunctionEditor to the new API.
    58512d30
geometry1dtransferfunctioneditor.cpp 16 KB