summaryrefslogtreecommitdiff
path: root/video.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'video.hpp')
-rw-r--r--video.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/video.hpp b/video.hpp
index 60127f3..13dbf16 100644
--- a/video.hpp
+++ b/video.hpp
@@ -104,6 +104,11 @@ enum class Blend_Mode {
max
};
+enum class Cull_Mode {
+ none,
+ back,
+ front
+};
struct Pipeline {
uint64_t pipeline_hash;
@@ -117,6 +122,7 @@ struct Pipeline {
Blend_Mode blend_mode;
Blend_Factor blend_src_alpha, blend_dst_alpha;
Blend_Mode blend_mode_alpha;
+ Cull_Mode cull_mode;
Vertex_Format_Id vertex_format;
Shader_Id shader;
Descriptor descriptors[pipeline_max_descriptors];
@@ -143,7 +149,8 @@ struct Pipeline {
blend_src_alpha == other.blend_src_alpha &&
blend_dst_alpha == other.blend_dst_alpha &&
blend_mode == other.blend_mode &&
- blend_mode_alpha == other.blend_mode_alpha;
+ blend_mode_alpha == other.blend_mode_alpha &&
+ cull_mode == other.cull_mode;
}
bool desc_layout_eq(const Pipeline& other) const {
@@ -300,6 +307,7 @@ struct Pipeline_Builder {
Blend_Factor src_alpha,
Blend_Factor dst_alpha
);
+ void cull(Cull_Mode mode);
void shader(Shader_Id s);
void vertex_format(Vertex_Format_Id vf);
void texture(int binding, Texture_Id t, Sampler_Id s);