summaryrefslogtreecommitdiff
path: root/pipeline.cpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-30 10:25:26 +1100
committerquou <quou@disroot.org>2024-12-30 10:25:26 +1100
commitb27cc55aa631c52dae4a1a9c8c6888fc063fe022 (patch)
treeefdb66a4c4e8a223f77da9eab100c21c468f1a2a /pipeline.cpp
parent693a133cb1a0356f3257f2879be4e23cbb67cbe3 (diff)
backface culling
Diffstat (limited to 'pipeline.cpp')
-rw-r--r--pipeline.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/pipeline.cpp b/pipeline.cpp
index cb052b8..2dc8ce9 100644
--- a/pipeline.cpp
+++ b/pipeline.cpp
@@ -180,6 +180,10 @@ void Pipeline_Builder::blend(
);
}
+void Pipeline_Builder::cull(Cull_Mode mode) {
+ pip->cull_mode = mode;
+}
+
void Pipeline_Builder::blend(
Blend_Mode mode_col,
Blend_Factor src_col,
@@ -265,6 +269,7 @@ Pipeline& Pipeline_Builder::build() {
h(pip->pipeline_hash, pip->blend_dst);
h(pip->pipeline_hash, pip->blend_src_alpha);
h(pip->pipeline_hash, pip->blend_dst_alpha);
+ h(pip->pipeline_hash, pip->cull_mode);
{
int i, e = pip->descriptor_count;
pip->descriptor_resource_hash = fnv1a64(0, 0);