aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bindings/cxx/include/pugl/pugl.hpp11
-rw-r--r--examples/pugl_vulkan_cxx_demo.cpp3
2 files changed, 10 insertions, 4 deletions
diff --git a/bindings/cxx/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp
index dd7389e..9e391fa 100644
--- a/bindings/cxx/include/pugl/pugl.hpp
+++ b/bindings/cxx/include/pugl/pugl.hpp
@@ -281,14 +281,21 @@ public:
~World() = default;
- explicit World(WorldType type, WorldFlags flags)
+ World(WorldType type, WorldFlag flag)
+ : Wrapper{puglNewWorld(static_cast<PuglWorldType>(type),
+ static_cast<PuglWorldFlags>(flag))}
+ {
+ PUGL_CHECK_CONSTRUCTION(cobj(), "Failed to create pugl::World");
+ }
+
+ World(WorldType type, WorldFlags flags)
: Wrapper{puglNewWorld(static_cast<PuglWorldType>(type), flags)}
{
PUGL_CHECK_CONSTRUCTION(cobj(), "Failed to create pugl::World");
}
explicit World(WorldType type)
- : World{type, {}}
+ : World{type, WorldFlags{}}
{}
/// @copydoc puglGetNativeWorld
diff --git a/examples/pugl_vulkan_cxx_demo.cpp b/examples/pugl_vulkan_cxx_demo.cpp
index 154bbaf..677750f 100644
--- a/examples/pugl_vulkan_cxx_demo.cpp
+++ b/examples/pugl_vulkan_cxx_demo.cpp
@@ -1438,8 +1438,7 @@ makeRects(const size_t numRects, const uint32_t windowWidth)
PuglVulkanDemo::PuglVulkanDemo(const PuglTestOptions& o, const size_t numRects)
: opts{o}
- , world{pugl::WorldType::program,
- static_cast<pugl::WorldFlags>(pugl::WorldFlag::threads)} // FIXME?
+ , world{pugl::WorldType::program, pugl::WorldFlag::threads}
, loader{world}
, view{world, *this}
, rects{makeRects(numRects, extent.width)}