diff options
Diffstat (limited to 'video.hpp')
-rw-r--r-- | video.hpp | 38 |
1 files changed, 20 insertions, 18 deletions
@@ -298,21 +298,23 @@ struct Pipeline_Builder { Pipeline_Builder(Arena* arena, Device* dev); - void begin_rp(); - void rp_target(Texture_Id id, Colour clear_colour); - void rp_target(Texture_Id id, Clear_Mode mode); - void rp_depth_target(Texture_Id id, float clear_depth); - void rp_depth_target(Texture_Id id, Clear_Mode mode); + using PB = Pipeline_Builder&; + + PB& begin_rp(); + PB& rp_target(Texture_Id id, Colour clear_colour); + PB& rp_target(Texture_Id id, Clear_Mode mode); + PB& rp_depth_target(Texture_Id id, float clear_depth); + PB& rp_depth_target(Texture_Id id, Clear_Mode mode); Render_Pass& build_rp(); void validate_rp(); - void begin(); - void viewport(int x, int y, int w, int h); - void scissor(int x, int y, int w, int h); - void depth(bool test, bool write, Depth_Mode mode); - void geo(Geo_Type type); - void blend(Blend_Mode mode, Blend_Factor src, Blend_Factor dst); - void blend( + PB& begin(const Render_Pass* p = 0); + PB& viewport(int x, int y, int w, int h); + PB& scissor(int x, int y, int w, int h); + PB& depth(bool test, bool write, Depth_Mode mode); + PB& geo(Geo_Type type); + PB& blend(Blend_Mode mode, Blend_Factor src, Blend_Factor dst); + PB& blend( Blend_Mode mode_col, Blend_Factor src_col, Blend_Factor dst_col, @@ -320,17 +322,17 @@ 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); - void cbuffer( + PB& cull(Cull_Mode mode); + PB& shader(Shader_Id s); + PB& vertex_format(Vertex_Format_Id vf); + PB& texture(int binding, Texture_Id t, Sampler_Id s); + PB& cbuffer( int binding, Buffer_Id id, int offset = 0, int size = 0 ); - void sbuffer( + PB& sbuffer( int binding, Buffer_Id id, int offset = 0, |