Namespace BSGameLib.Game.Rendering
Classes
- FrameGraph
Runs a frame's render passes in order, releasing each transient resource once the last pass that uses it has run. A graph is built with FrameGraphBuilder and run with Execute(FrameGraph).
- FrameGraphBuilder
Collects passes and resources for a single frame's render dependency graph, then resolves them into an ordered FrameGraph via Build().
- FrameGraphBuilder.FrameGraphPassBuilder
Fluent configuration for a single pass, returned by AddPass(string). Renders(RenderPassDescriptor), Reads(FrameGraphResourceHandle), Writes(FrameGraphResourceHandle), Releases(FrameGraphResourceHandle), and DependsOn(FrameGraphPassHandle) are all optional and chainable in any order — call whichever ones apply to your pass, skip the rest. Execute(Action<FrameGraphPassContext>) is the one call every pass needs, and the only one that hands back a usable FrameGraphPassHandle (e.g. to pass to another pass's DependsOn(FrameGraphPassHandle), or to
Game.AddDefaultRenderGraphPass'sdependsOnparameter) — so it belongs last in the chain.
- FrameGraphDebugInfo
A frame graph's passes and resources, as a debugging view of it.
- FrameGraphExecutionContext
The services, render factories and resource allocator a FrameGraph runs its passes with.
- FrameGraphPassContext
What a pass sees while it runs: its name, the resources it declared, and how to get them.
- FrameGraphPassDebugInfo
A pass of a frame graph, as a debugging view of it.
- FrameGraphPassDescription
Describes a pass of a FrameGraph: its name and the resources it reads and writes.
- FrameGraphResourceDebugInfo
A resource of a frame graph, as a debugging view of it.
- FrameGraphResourceInfo
A resource that a frame graph declares: its handle, its name, how it is described, and whether it was imported rather than made by the graph.
- MaterialBuilder
Configures a material's name, shader, passes and requirements. The shader manager passes one to the configuring callback of its material registration.
- MaterialDefinition
Immutable description of a material registered with ShaderManager.
- RenderPassScope
Disposable scope returned by graphics when a render pass begins.
- RenderTargetScope
Convenience scope specifically for temporarily binding a render target.
- TextRendererScopeExtensions
Helpers for rendering text directly through an encoder scope.
Structs
- FrameGraphPassHandle
Identifies a pass node inside the frame graph.
- FrameGraphResourceAllocatorStats
A snapshot of the frame graph's transient render targets.
- FrameGraphResourceDescriptor
Describes how a transient frame-graph resource should be created.
- FrameGraphResourceHandle
Identifies a resource that participates in the frame graph.
- RenderBackendCapabilities
Describes baseline capabilities surfaced by a rendering backend. Backends advertise the features they implement so higher-level systems can react at runtime.
- RenderBackendCreateInfo
Metadata required to initialize a backend for a given window/surface.
- RenderEncoderPassMetrics
The counts for one pass, as PassMetrics reports them.
- RenderPassDescriptor
Describes how a render pass should be configured before drawing.
- RenderTargetDescription
Describes how a concrete render target should be realized for a frame-graph resource.
- ShapeDrawOptions
Describes a shape draw call in a renderer-agnostic way.
- SpriteDrawOptions
Immutable description of a sprite draw request.
- TextureUploadDescriptor
The pixels of a texture to upload, and how they are laid out.
Interfaces
- IClearRenderer
Backend-specific implementation of "fill the currently bound target with a color, right now" - what Clear(Color) ultimately calls into. Immediate on OpenGL; queued for replay at the correct point in the recorded command buffer on Vulkan (see
IVulkanClearSink) - the two backends don't share an implementation because OpenGL executes draw calls synchronously and Vulkan doesn't.
- IClearRendererBackend
Implemented by IRenderBackends that can produce an IClearRenderer - same capability-interface pattern as ISpriteBatchRendererBackend/
IFullScreenEffectBackend.
- IDisplayController
Controls display level settings such as VSync and fullscreen state.
- IFullScreenEffect
Represents a backend-specific fullscreen effect that can blend between textures.
- IFullScreenEffectBackend
Implemented by render backends that can construct fullscreen effect factories.
- IFullScreenEffectFactory
Creates full-screen effects.
- IGraphics2D
Facade exposing the encoder-era rendering entry points in one place for consumers.
- IMetrics
The base interface of the render metrics.
- IOffscreenRenderer
Provides helpers for rendering into offscreen targets without exposing the full graphics surface.
- IRenderBackend
Abstraction over low-level graphics implementations (OpenGL, Vulkan, etc.).
- IRenderBackendContext
Represents an initialized backend context bound to a swap chain / render surface.
- IRenderContextFactory
Begins the render passes and encoders that a frame draws with, and builds and runs its frame graphs.
- IRenderEncoderMetrics
Counts what the encoders submit, in total and for each pass. Reset() clears the counts.
- IRenderEncoderScope
Represents a scoped encoder that records sprite/shape commands and flushes on dispose.
- IRenderMetrics
Sprite batch counts for each frame. The renderers add to the current frame as they flush; the render context starts a frame before it executes the frame graph and completes it after.
- IRenderSurface
Describes the logical render surface exposed to higher level systems (UI, gameplay, input).
- IRenderTarget
Represents a backend-provided renderable texture surface.
- IRenderTargetAllocator
Public surface for creating render targets without exposing the internal factory.
- IRenderTargetBackend
Implemented by render backends that can create render target factories.
- IShaderCompiler
Compiles GLSL to SPIR-V for the Vulkan backend at runtime.
- IShaderProgram
A compiled shader program: its vertex and fragment stages, and the uniforms that are set on them.
- IShaderProgramBackend
Implemented by render backends that can create shader program factories.
- IShaderProgramFactory
Creates shader programs from source code.
- IShapeBatchRenderer
Collects shapes for drawing with one shader and projection.
- IShapeBatchRendererBackend
Implemented by render backends that can create shape batch renderer factories.
- IShapeBatchRendererFactory
Creates shape batches.
- ISpriteBatchRenderer
Collects sprites, then draws them all with Render().
- ISpriteBatchRendererBackend
Implemented by render backends that can create sprite batch renderer factories.
- ISpriteBatchRendererFactory
Creates sprite batches.
- ITextRenderer
Converts text into sprite draw descriptors so glyphs flow through the encoder path.
- ITextureUploadBackend
Puts texture pixels on the graphics device, as the backend's textures.
- ITextureUploadBackendFactory
Implemented by render backends that can create texture upload backends.
Enums
- FrameGraphResourceFlags
How a frame graph resource is used. Flags can be combined.
- FrameGraphResourceFormat
Represents the intended pixel storage for a frame-graph resource.
- FrameGraphValidationMode
Controls the level of validation performed when building a frame graph.
- RenderPassTag
Tags describing which kind of frame-graph pass a material or draw may participate in.
- ShaderStage
A programmable stage of a shader program.
- ShapePrimitive
The kind of shape a ShapeDrawOptions draws.
- TexturePixelFormat
The layout of the bytes of a pixel.