20#ifndef RHI_RENDER_THREAD_WINDOW_STATE_H
21#define RHI_RENDER_THREAD_WINDOW_STATE_H
221 using Clock = std::chrono::steady_clock;
Lock-free single-slot mailbox carrying frame state from the main thread to the render thread.
The Cairo implementation of the graphics abstraction layer.
uint32_t RHI_WINDOW_ID
Routes control commands to a swapchain.
RHI_HANDLE< RHI_TAG_FRAMEBUFFER > RHI_FramebufferHandle
RHI_HANDLE< RHI_TAG_BUFFER > RHI_BufferHandle
RHI_HANDLE< RHI_TAG_BIND_GROUP > RHI_BindGroupHandle
RHI_HANDLE< RHI_TAG_SURFACE > RHI_SurfaceHandle
RHI_HANDLE< RHI_TAG_SWAPCHAIN > RHI_SwapchainHandle
GPU geometry of one frame, built by GAL_MODERN after EndDrawing() and passed through the FRAME_MAILBO...
Per-frame uniform block matching FrameUBO in frame_ubo.glsl (std140).
Grid uniform block matching the GridUBO layout in grid.frag (std140).
How far the view has moved since the static target was drawn, in whole frame pixels.
What a geometry target holds, so a frame asking for the same content at the same camera can reuse it.
uint32_t margin
how much of the static target's margin was drawn
Per-window state owned by the render thread.
RHI_VIEW_SHIFT staticShift
How far the view has moved since the static target was drawn.
RHI_FramebufferHandle diffBelowFBO
Copies of what lies under a difference layer, for the view sized targets and the static one.
RHI_FramebufferHandle staticDiffBelowFBO
RHI_FramebufferHandle dynamicFBO
uint32_t StaticHeight() const
Clock::time_point lastRenderStartTime
uint32_t consecutivePresentFailures
uint64_t swapchainCreateAttempts
RHI_FramebufferHandle overlayGeometryFBO
Overlay content, drawn from a transparent start and composited over the dynamic target (see RHI_GAL_P...
FRAME_UNIFORMS uniformSets[UNIFORM_GENERATIONS]
int32_t ShownStaticY() const
Clock::time_point lastFrameRequestTime
RENDERED_CONTENT renderedStatic
static constexpr size_t UNIFORM_GENERATIONS
A frame's passes are still queued when the next frame is built, so frames rotate through several unif...
Clock::time_point lastSwapchainCreateAttemptTime
RHI_SwapchainHandle swapchain
uint32_t supersampleFactor
Supersampling factor.
Clock::time_point lastLagLogTime
RHI_FramebufferHandle ShownStaticFBO() const
FRAME_DRAW_DESC dynamicDrawDesc
float refreshHz
A swapchain that presents immediately is drawn at most once per refresh unless the frame answers inpu...
bool staticInMargin
the content shown is in staticFBO
RHI_FramebufferHandle staticTempFBO
The static target's temp target, made when a static layer first needs one.
Clock::time_point lastPresentAttemptTime
RHI_NATIVE_WINDOW_HANDLE nativeHandle
Clock::time_point nextPresentRetryAt
uint64_t lastRenderedGeneration
uint64_t lastPresentedGeneration
Clock::time_point nextFrameAt
earliest time such a window may be drawn again
bool needsStaticInvalidate
int32_t ShownStaticX() const
Where the view starts in the shown static target, in texels.
Clock::time_point lastPresentFailureTime
RHI_FramebufferHandle accumulationFBO
Color only, without depth or stencil.
RENDERED_CONTENT renderedDynamic
FRAME_DRAW_DESC staticDrawDesc
Static and dynamic pool descriptions, each drawn into its own target.
RHI_FramebufferHandle staticViewFBO
Static content drawn without the margin, as during a zoom, goes into this view sized target so the zo...
Clock::time_point lastActivityTime
RHI_FramebufferHandle overlayMarginFBO
Overlay content that stayed the same through a pan, drawn with the static target's margin.
RHI_VIEW_SHIFT overlayShift
How far the view has moved since overlayMarginFBO was drawn.
uint64_t geometryRenderPasses
render passes begun while drawing geometry
uint64_t presentFailureCount
uint32_t staticMargin
Frame pixels the static target holds beyond each view edge so a pan within them is only a shift.
uint64_t drawnInputSerial
FRAME_PACKET::inputSerial of the last packet loaded.
uint64_t dynamicPasses
times dynamicFBO was re-rendered
RHI_SurfaceHandle surface
std::chrono::steady_clock Clock
uint32_t RenderHeight() const
bool overlayGeometryDrawn
uint32_t StaticWidth() const
FRAME_UNIFORMS & Uniforms()
uint64_t requestedGeneration
Clock::time_point lastPresentSuccessTime
FRAME_MAILBOX * mailbox
Owned by the panel.
bool dynamicGeometryDrawn
An empty dynamicFBO is neither drawn nor composited.
RHI_FramebufferHandle staticFBO
uint32_t RenderWidth() const
RHI_FramebufferHandle tempFBO
uint64_t staticPasses
times staticFBO was re-rendered
RENDERED_CONTENT renderedOverlay
the overlay target keeps the static target's margin
Clock::time_point lastRenderCompleteTime
uint64_t presentSuccessCount
Platform-agnostic wrapper for a native window handle.