Skip to content

Commit 5953458

Browse files
committed
Demos - fix for MacOS
1 parent 88cabe5 commit 5953458

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

tutorials/common/common.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
#include <assert.h>
44
#include <iostream>
55

6-
// creation flags used by most of the Demo.
7-
// examples:
8-
// RPR_CREATION_FLAGS_ENABLE_GPU0 <- use the first GPU
9-
// RPR_CREATION_FLAGS_ENABLE_CPU <- use the first CPU only
10-
// RPR_CREATION_FLAGS_ENABLE_GPU0 | RPR_CREATION_FLAGS_ENABLE_CPU <- use the first CPU+GPU
11-
// RPR_CREATION_FLAGS_ENABLE_GPU0 | RPR_CREATION_FLAGS_ENABLE_GPU1 <-- use 2 GPU
12-
rpr_creation_flags g_ContextCreationFlags = RPR_CREATION_FLAGS_ENABLE_GPU0;
13-
14-
156
// Tahoe plugin is in maintenance mode - no new features planned.
167
#if 0
178
#if defined(WIN32)
@@ -30,12 +21,24 @@ rpr_creation_flags g_ContextCreationFlags = RPR_CREATION_FLAGS_ENABLE_GPU0;
3021
#define RPR_PLUGIN_FILE_NAME "libNorthstar64.so"
3122
#elif defined(__APPLE__)
3223
#define RPR_PLUGIN_FILE_NAME "libNorthstar64.dylib"
33-
g_ContextCreationFlags |= RPR_CREATION_FLAGS_ENABLE_METAL; // by default always enable Metal for MacOS
3424
#endif
3525
#define USING_NORTHSTAR
3626
#endif
3727

3828

29+
// creation flags used by most of the Demo.
30+
// examples:
31+
// RPR_CREATION_FLAGS_ENABLE_GPU0 <- use the first GPU
32+
// RPR_CREATION_FLAGS_ENABLE_CPU <- use the first CPU only
33+
// RPR_CREATION_FLAGS_ENABLE_GPU0 | RPR_CREATION_FLAGS_ENABLE_CPU <- use the first CPU+GPU
34+
// RPR_CREATION_FLAGS_ENABLE_GPU0 | RPR_CREATION_FLAGS_ENABLE_GPU1 <-- use 2 GPU
35+
const rpr_creation_flags g_ContextCreationFlags = RPR_CREATION_FLAGS_ENABLE_GPU0
36+
#if defined(USING_NORTHSTAR) && defined(__APPLE__)
37+
| RPR_CREATION_FLAGS_ENABLE_METAL // by default always enable Metal for MacOS
38+
#endif
39+
;
40+
41+
3942
// Structure to describe vertex layout
4043
struct vertex
4144
{

0 commit comments

Comments
 (0)