diff options
author | quou <quou@disroot.org> | 2024-12-23 14:41:01 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-23 14:41:01 +1100 |
commit | b293168cc158d65f1a5146f155921ff82119d1bc (patch) | |
tree | 08cc5ee235b4b7ca6ead45c43f9b407664971613 /video.hpp | |
parent | 58245585cbe77e6c03ebe13f29e10393ff3c45b4 (diff) |
Texture conversion and loading
Diffstat (limited to 'video.hpp')
-rw-r--r-- | video.hpp | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -96,7 +96,15 @@ struct Pipeline_Builder { void validate(); }; -struct Texture { +enum Resource_State { + undefined, + copy_dst, + copy_src, + shader_read +}; + +struct Texture : public Asset { + Texture_Id id; int w, h; bool alias; }; @@ -114,7 +122,9 @@ namespace Buffer_Flags { }; }; -struct Buffer {}; +struct Buffer { + Buffer_Id id; +}; struct Context; struct Shader; @@ -149,21 +159,22 @@ struct Device { }; struct Context { - void wait(Device& d); + void wait(); void submit( - Device& d, const Draw& draw, const Pipeline& p, const Render_Pass& rp ); void submit( - Device& d, const Draw* draws, int count, const Pipeline& p, const Render_Pass& rp ); - void submit(Device& d, const Render_Pass& rp); + void submit(const Render_Pass& rp); + void copy(Buffer_Id dst, Buffer_Id src); + void copy(Texture_Id dst, Buffer_Id src); + void transition(Texture_Id id, Resource_State state); }; struct Shader : public Asset { @@ -175,13 +186,6 @@ struct Shader : public Asset { int binding_index(const char* name); int attribute_index(const char* name); int target_index(const char* name); - - bool load( - Asset_Loader* loader, - Arena* a, - Pack_File* f - ) override; - void unload(Asset_Loader* loader) override; }; #endif |