Skip to content

Commit 5a8462a

Browse files
author
Ilija Puaca
authored
Deck drawing options renamed (#157)
1 parent 3affdbb commit 5a8462a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cpp/examples/deck.gl/texture-render.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ auto createDeck(const char* argv[], const wgpu::Device& device, const lumagl::Si
8585
deckProps->width = size.width;
8686
deckProps->height = size.height;
8787

88-
deckProps->drawingOptions = std::make_shared<lumagl::AnimationLoop::Options>(device, device.CreateQueue());
88+
deckProps->drawingOptions = std::make_shared<DrawingOptions>(device, device.CreateQueue());
8989

9090
probegl::Error error;
9191
auto deck = Deck::make(error, deckProps);

cpp/modules/deck.gl/core/src/lib/deck.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,16 @@ class Deck : public Component {
9595
lumagl::Size _size;
9696
};
9797

98+
// Instead of maintaining another structure with options, we reuse the relevant struct from lumagl
99+
using DrawingOptions = lumagl::AnimationLoop::Options;
98100
class Deck::Props : public Component::Props {
99101
public:
100102
using super = Component::Props;
101103

102104
int width{100}; // Dummy value, ensure something is visible if user forgets to set window size
103105
int height{100}; // Dummy value, ensure something is visible if user forgets to set window size
104106

105-
std::shared_ptr<lumagl::AnimationLoop::Options> drawingOptions;
107+
std::shared_ptr<DrawingOptions> drawingOptions;
106108

107109
// Layer/View/Controller settings
108110
std::list<std::shared_ptr<Layer::Props>> layers;

0 commit comments

Comments
 (0)