Qt-RHI scene renderer: shader pipelines, lighting, dual render targets and per-frame draw orchestration for disp3D. More...
#include "../disp3D_global.h"#include "../core/rendertypes.h"#include <QMatrix4x4>#include <QVector3D>#include <memory>

Go to the source code of this file.
Classes | |
| class | DISP3DLIB::BrainRenderer |
| Qt RHI-based 3-D renderer managing scene objects, lighting, camera, and render pipeline for brain visualization. More... | |
| struct | DISP3DLIB::BrainRenderer::SceneData |
| Per-draw scene uniforms: camera matrices, light and overlay mode. More... | |
Namespaces | |
| namespace | DISP3DLIB |
| 3-D brain visualisation using the Qt RHI rendering backend. | |
Qt-RHI scene renderer: shader pipelines, lighting, dual render targets and per-frame draw orchestration for disp3D.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
BrainRenderer is the only object in disp3D that talks directly to QRhi. It creates the shader pipelines for every DISP3DLIB::ShaderMode (Standard Phong, Holographic, Anatomical, Dipole arrows, XRay, ShowNormals), allocates the dual rtClear / rtPreserve render targets needed for the multi-pass cortex + overlay composition, and issues per-frame beginPass / drawIndexed calls for every visible scene object.
The renderer packs camera matrices, light direction and the active overlay mode (DISP3DLIB::BrainRenderer::SceneData) into one uniform slot per draw. All slots and uploads of a frame are prepared before its render pass, which then only binds and draws.
All scene objects (DISP3DLIB::BrainSurface, DISP3DLIB::DipoleObject, DISP3DLIB::NetworkObject, DISP3DLIB::VideoOverlay) are accepted through opaque pointers so the renderer never pulls in the heavy headers of the modalities it draws.
Definition in file brainrenderer.h.