Binds the rendering pipeline to ossia processes. More...
Detailed Description
Binds the rendering pipeline to ossia processes.
This namespace contains the machinery that ties the rendering features provided by score::gfx to the ossia execution engine and data model.
It works as follows:
Every time processes execute, visual processes will mark themselves as executed, by notifying Gfx::GfxExecutionAction.
This is necessary because the visual graph is dynamic: processes can come on and off at any point during execution.
- After all the ossia execution graph nodes have executed, the new edges between nodes are sent to the graphics processing thread, to Gfx::GfxContext.
- This thread regularly updates the graph with the incoming information, either before VSync if VSync is enabled or with a timer otherwise:
- Edges are updated with the currently running nodes in the score
- Parameters, audio data... sent to the ossia processes in the execution graph are converted into uniforms corresponding to the shaders used, and uploaded to the GPU.
Typedefs | |
| using | av_input_video_type = decltype(av_input_video_device_next(nullptr)) |
| using | port_index = ossia::gfx::port_index |
| using | exec_controls = std::vector< std::shared_ptr< exec_control > > |
Functions | |
| std::shared_ptr< CameraDeviceEnumerator > | make_camera_enumerator () |
| const CommandGroupKey & | CommandFactoryName () |
| std::vector< ossia::net::parameter_base * > | addControlGroup (ossia::net::device_base &dev, ossia::net::node_base &parent, const std::string &group, const std::vector< TreeControl > &controls) |
Creates <parent>/<group>/<name> for each control. | |
| template<typename Vector > | |
| int64_t | index_of (Vector &&v, const typename std::remove_reference_t< Vector >::value_type &t) |
| ossia::value | fromImageSet (const std::span< score::gfx::Image > &images) |
| void | releaseImages (std::vector< score::gfx::Image > &imgs) |
| std::vector< score::gfx::Image > | getImages (const ossia::value &val, const score::DocumentContext &ctx) |
| ShaderSource | programFromISFFragmentShaderPath (const QString &fsFilename, QByteArray fsData, ShaderSource::ProgramType type=ShaderSource::ProgramType::ISF) |
| ShaderSource | programFromVSAVertexShaderPath (const QString &vertexFilename, QByteArray vertexData) |
| std::pair< QByteArray, QString > | preprocessShaderIncludes (QByteArray source, const QString &originPath={}) noexcept |
| CGLContextObj | nativeContext (QRhi &rhi) |
| score::gfx::OutputNode * | makeSyphonOutput (const SharedOutputSettings &s) |
| MODEL_METADATA_IMPL_CPP (TextureInlet) | |
| MODEL_METADATA_IMPL_CPP (TextureOutlet) | |
| QImage | renderTestCard (int w, int h) |
| QPoint | windowPositionForSource (QPoint p) noexcept |
Where to put the window of an output whose source starts at p. | |
Variables | |
| ShaderPreviewManager * | g_shaderPreview {} |
| bool | g_shaderPreviewScheduledForDeletion {} |
Function Documentation
◆ addControlGroup()
|
inline |
Creates <parent>/<group>/<name> for each control.
- Returns
- the created parameters, in the order of
controls, so the caller can push values back into them later. An entry is null when its node could not be created – a name collision, in practice.
◆ makeSyphonOutput()
| score::gfx::OutputNode * Gfx::makeSyphonOutput | ( | const SharedOutputSettings & | s | ) |
Headless factory for the Syphon publishing node, so a test harness can drive the real output without the Device / Document machinery – the same hook Gfx::PipeWire::makePipewireOutput provides.
◆ windowPositionForSource()
|
inlinenoexcept |
Where to put the window of an output whose source starts at p.
The desktop origin is a bad place for a window: it is hard to grab by its title bar on Windows, and a tiling window manager may not map it at all – on i3 the first output window stayed invisible until it was moved by one pixel. Only that exact spot is moved; anywhere else is left alone.