Skip to content

Commit 18afae4

Browse files
committed
More automatic usage
1 parent 0b658cf commit 18afae4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

modules/yup_graphics/native/yup_GraphicsContext_impl.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,26 @@ namespace yup
2424

2525
std::unique_ptr<GraphicsContext> GraphicsContext::createContext (Options options)
2626
{
27-
#if JUCE_MAC || JUCE_IOS
27+
#if (JUCE_MAC || JUCE_IOS)
28+
#if YUP_RIVE_USE_METAL
2829
return createContext (Api::Metal, options);
30+
#else
31+
return createContext (Api::OpenGL, options);
32+
#endif
33+
2934
#elif JUCE_WINDOWS
35+
#if YUP_RIVE_USE_D3D
3036
return createContext (Api::Direct3D, options);
37+
#else
38+
return createContext (Api::OpenGL, options);
39+
#endif
40+
3141
#elif JUCE_LINUX || JUCE_WASM || JUCE_ANDROID
3242
return createContext (Api::OpenGL, options);
43+
3344
#else
3445
return nullptr;
46+
3547
#endif
3648
}
3749

0 commit comments

Comments
 (0)