Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
PipelineState.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
21#pragma once
22
23#include "../../core/Types.hpp"
24#include "../draw/BlendMode.hpp"
25#include "./GfxEnums.hpp"
26
27namespace esengine {
28
42
43inline bool writesStencil(GfxStencilMode mode) {
44 return mode == GfxStencilMode::Write || mode == GfxStencilMode::Increment
46}
47
52enum class GfxTopology : u8 {
55};
56
95
97enum class PipelineHandle : u32 { Invalid = 0 };
98
99} // namespace esengine
Blend mode enumeration for custom rendering.
Backend-agnostic graphics enumerations.
Core type definitions and utilities for ESEngine.
bool writesStencil(GfxStencilMode mode)
GfxStencilMode
Stencil behaviour baked into a pipeline. The reference value is dynamic (GfxDevice::setStencilReferen...
@ Test
Draw only INSIDE the mask: func Equal, op Keep.
@ Write
Write the reference where drawn (mask fill): func Always, op Replace, color write off.
@ Decrement
Restore the parent reference on leaving a nested mask.
@ Increment
Enter a nested mask only where the parent reference matches.
@ TestOutside
Draw only OUTSIDE it: func NotEqual, op Keep — a hole, not a window.
@ Off
No stencil test; full color write.
@ Zero
Retire a root mask without writing color.
std::int16_t i16
Signed 16-bit integer.
Definition Types.hpp:52
PipelineHandle
Opaque handle to a cached pipeline; PipelineHandle{0} is the null/invalid handle.
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
BlendMode
Predefined blend modes for rendering.
Definition BlendMode.hpp:22
std::uint8_t u8
Unsigned 8-bit integer.
Definition Types.hpp:41
GfxTopology
How a pipeline's indices assemble into primitives. Baked into the pipeline, as WebGPU bakes it,...
@ Triangles
Every three indices a triangle: all geometry the engine draws.
@ Lines
Every two indices a line segment: a mesh's edges, for a diagnostic view.
Immutable description of a draw pipeline. Equality keys the pipeline cache, so two draws with the sam...
bool operator==(const PipelineDesc &) const =default
bool colorWrite
False writes no colour, to either attachment: a depth-only pass, whose surfaces are then drawn again ...
VertexLayoutHandle vertexLayout