diff options
author | Hugues Evrard <hevrard@users.noreply.github.com> | 2019-01-28 17:06:16 +0000 |
---|---|---|
committer | dan sinclair <dj2@everburning.com> | 2019-01-28 12:06:16 -0500 |
commit | 970ba7a99eba1cd8d8a1ea10e4525db8b93fd284 (patch) | |
tree | e721902a817418e544d52eeb3cd7385ea214dd31 /include/amber/amber.h | |
parent | bca10fbe5f6fe21cae4c8cca0ccf0d07719c8670 (diff) | |
download | amber-970ba7a99eba1cd8d8a1ea10e4525db8b93fd284.tar.gz |
Add framebuffer dump in PPM format (#227)
This CL plumbs through the ability to dump the framebuffer into a PPM image.
Diffstat (limited to 'include/amber/amber.h')
-rw-r--r-- | include/amber/amber.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/amber/amber.h b/include/amber/amber.h index 95eb189..c4ab3a0 100644 --- a/include/amber/amber.h +++ b/include/amber/amber.h @@ -23,6 +23,7 @@ #include "amber/recipe.h" #include "amber/result.h" +#include "amber/value.h" namespace amber { @@ -40,11 +41,24 @@ enum EngineType { /// Override point of engines to add their own configuration. struct EngineConfig {}; +struct BufferInfo { + /// Holds the buffer name + std::string buffer_name; + /// Holds the buffer width + uint32_t width; + /// Holds the buffer height + uint32_t height; + /// Contains the buffer internal data + std::vector<Value> values; +}; + struct Options { /// Sets the engine to be created. Default Vulkan. EngineType engine; /// Holds engine specific configuration. Ownership stays with the caller. EngineConfig* config; + /// Lists the buffers to extract at the end of the execution + std::vector<BufferInfo> extractions; }; /// Main interface to the Amber environment. @@ -58,13 +72,13 @@ class Amber { /// Executes the given |recipe| with the provided |opts|. Returns a /// |Result| which indicates if the execution succeded. - amber::Result Execute(const amber::Recipe* recipe, const Options& opts); + amber::Result Execute(const amber::Recipe* recipe, Options* opts); /// Executes the given |recipe| with the provided |opts|. Will use /// |shader_map| to lookup shader data before attempting to compile the /// shader if possible. amber::Result ExecuteWithShaderData(const amber::Recipe* recipe, - const Options& opts, + Options* opts, const ShaderMap& shader_data); }; |