docs update
This commit is contained in:
@@ -39,14 +39,14 @@ The current rendering path is split across several classes:
|
||||
- [OpenGLComposite.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp:86) constructs the renderer, render pipeline, shader programs, runtime services, and video bridge in one owner.
|
||||
- [OpenGLRenderPipeline.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:31) performs pass execution, pack/readback, preview paint, and performance stat publication.
|
||||
- [OpenGLVideoIOBridge.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:58) accepts capture frames and still performs render work from the playout completion callback path.
|
||||
- `OpenGLComposite` still holds render-local overlay behavior and shader rebuild handling alongside runtime orchestration responsibilities.
|
||||
- `RenderFrameStateResolver` and `RenderStateComposer` now keep frame-state selection and live value composition outside GL drawing, while `RenderEngine` still owns the current GL resource and draw path.
|
||||
|
||||
That split is workable today, but it creates architectural pressure:
|
||||
|
||||
- GL ownership is thread-shared instead of sole-owned.
|
||||
- render and playout timing are still callback-coupled.
|
||||
- preview and playout are produced in the same immediate path.
|
||||
- render-local transient state is too easy to leak back into runtime-facing code.
|
||||
- render-local transient state now has clearer Phase 3 boundaries, but GL ownership is still shared through callback and UI entrypoints.
|
||||
- it is difficult to test render behavior separately from app bootstrap and hardware integration.
|
||||
|
||||
`RenderEngine` exists to absorb that responsibility into one subsystem with one direction of ownership.
|
||||
@@ -170,11 +170,12 @@ Other threads should interact with the subsystem through queues, snapshots, and
|
||||
|
||||
## Current State
|
||||
|
||||
Today GL work is still shared across callback-driven entrypoints:
|
||||
Today GL work is still shared across callback-driven and UI entrypoints:
|
||||
|
||||
- input upload occurs in [OpenGLVideoIOBridge::VideoFrameArrived()](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:58)
|
||||
- playout-triggered render occurs in [OpenGLVideoIOBridge::PlayoutFrameCompleted()](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:95)
|
||||
- input upload is requested through [OpenGLVideoIOBridge::UploadInputFrame()](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:11)
|
||||
- playout-triggered render is requested through [OpenGLVideoIOBridge::RenderScheduledFrame()](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:18)
|
||||
- render-pass execution occurs in [OpenGLRenderPipeline::RenderFrame()](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLRenderPipeline.cpp:31)
|
||||
- preview and screenshot paths still enter `RenderEngine` methods that bind the shared context
|
||||
|
||||
The `CRITICAL_SECTION` protects correctness, but it is not the target architectural model.
|
||||
|
||||
@@ -406,6 +407,8 @@ inside render-owned code paths instead of putting them back into runtime storage
|
||||
|
||||
Introduce snapshot-facing APIs so render no longer depends on broad runtime-state access for frame production.
|
||||
|
||||
Current status: Phase 3 introduced `RenderFrameInput`, `RenderFrameState`, and `RenderFrameStateResolver`, so frame-state selection is named and no longer lives inside GL drawing. Phase 4 can build on that contract while moving GL ownership.
|
||||
|
||||
### Step 4. Move Uploads Onto Render Ownership
|
||||
|
||||
Input callbacks should enqueue or hand off frame data; render executes the upload.
|
||||
|
||||
@@ -102,7 +102,7 @@ This work is currently split across:
|
||||
|
||||
- [DeckLinkSession::ConfigureInput](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/videoio/decklink/DeckLinkSession.cpp:221)
|
||||
- [CaptureDelegate::VideoInputFrameArrived](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/videoio/decklink/DeckLinkFrameTransfer.cpp:33)
|
||||
- [OpenGLVideoIOBridge::VideoFrameArrived](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:50)
|
||||
- [OpenGLVideoIOBridge::UploadInputFrame](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:11)
|
||||
|
||||
### 3. Output Lifecycle and Output Callback Handling
|
||||
|
||||
@@ -307,7 +307,7 @@ Today the callback path effectively does this:
|
||||
|
||||
That path is visible in:
|
||||
|
||||
- [OpenGLVideoIOBridge::PlayoutFrameCompleted](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:83)
|
||||
- [OpenGLVideoIOBridge::RenderScheduledFrame](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:18)
|
||||
|
||||
This couples output timing directly to render work.
|
||||
|
||||
@@ -354,7 +354,7 @@ Recommended default policy for live playout:
|
||||
|
||||
The current "skip upload if the GL bridge is busy" behavior is directionally correct for live timing:
|
||||
|
||||
- [OpenGLVideoIOBridge::VideoFrameArrived](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:57)
|
||||
- [OpenGLVideoIOBridge::UploadInputFrame](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp:11)
|
||||
|
||||
But in the target architecture that decision should move out of GL lock acquisition and into an explicit backend-to-render handoff queue policy.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user