Unravel Engine C++ Reference
Loading...
Searching...
No Matches
program.cpp
Go to the documentation of this file.
1#include "program.hpp"
3
7
8namespace unravel
9{
11{
12 try_save(ar, ser20::make_nvp("shaders", obj.get_shaders()));
13}
16
18{
19 std::vector<asset_handle<gfx::shader>> shaders;
20
21 try_load(ar, ser20::make_nvp("shaders", shaders));
22
23 for(const auto& shader : shaders)
24 {
25 obj.attach_shader(shader);
26 }
27 obj.populate();
28}
31} // namespace unravel
Class representing a GPU program.
Definition gpu_program.h:17
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
#define LOAD(cls)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
#define SAVE(cls)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool