aboutsummaryrefslogtreecommitdiff
path: root/include/amber/amber.h
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-11-28 16:58:50 -0500
committerGitHub <noreply@github.com>2018-11-28 16:58:50 -0500
commit0eabcb34cbcddc0ecaec6585d9e0218d6e91f32f (patch)
tree6d44d5eedd798f3150bfaef5a89be9e476e1214c /include/amber/amber.h
parent08f848aae847d99cb9a81fac49401b921e5f930b (diff)
downloadamber-0eabcb34cbcddc0ecaec6585d9e0218d6e91f32f.tar.gz
Fill in some documentation. (#116)
Diffstat (limited to 'include/amber/amber.h')
-rw-r--r--include/amber/amber.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/amber/amber.h b/include/amber/amber.h
index 343a564..a20fce7 100644
--- a/include/amber/amber.h
+++ b/include/amber/amber.h
@@ -22,21 +22,31 @@
namespace amber {
enum class EngineType : uint8_t {
+ /// Use the Vulkan backend, if available
kVulkan = 0,
+ /// Use the Dawn backend, if available
kDawn,
};
struct Options {
+ /// Sets the engine to be created. Default Vulkan.
EngineType engine = EngineType::kVulkan;
+ /// Holds the device for the given engine. If the device is a |nullptr|
+ /// a device will be created. If a |default_device| is provided it must
+ /// outlive the Amber instance and clean is the callers responsibility.
void* default_device = nullptr;
+ /// Set true to only parse the given script, does not execute the engine.
bool parse_only = false;
};
+/// Main interface to the Amber environment.
class Amber {
public:
Amber();
~Amber();
+ /// Executes the given |data| script with the provided |opts|. Returns a
+ /// |Result| which indicates if the execution succeded.
amber::Result Execute(const std::string& data, const Options& opts);
};