|
47 | 47 |
|
48 | 48 | #pragma once |
49 | 49 |
|
50 | | -// TODO - Other deps: rive-decoders rive-dependencies |
| 50 | +//============================================================================== |
| 51 | +/** Config: YUP_RIVE_USE_METAL |
| 52 | + Enables the use of the Metal renderer on macOS (the default is enabled). |
| 53 | +*/ |
| 54 | +#ifndef YUP_RIVE_USE_METAL |
| 55 | +#define YUP_RIVE_USE_METAL 1 |
| 56 | +#endif |
| 57 | + |
| 58 | +/** Config: YUP_RIVE_USE_D3D |
| 59 | + Enables the use of the Direct3D renderer on Windows (the default is enabled). |
| 60 | +*/ |
| 61 | +#ifndef YUP_RIVE_USE_D3D |
| 62 | +#define YUP_RIVE_USE_D3D 1 |
| 63 | +#endif |
| 64 | + |
| 65 | +/** Config: YUP_RIVE_USE_OPENGL |
| 66 | + Enables the use of the OpenGL renderer on platform that support it but where it is not used by default (in |
| 67 | + the specific case macOS and Windows). |
| 68 | +
|
| 69 | + You will need to link to the specific OpenGL framework on macOS when building your application with this |
| 70 | + flag set: add "-framework OpenGL" to link flags. |
| 71 | +*/ |
| 72 | +#ifndef YUP_RIVE_USE_OPENGL |
| 73 | +#define YUP_RIVE_USE_OPENGL 0 |
| 74 | +#endif |
| 75 | + |
| 76 | +/** Config: YUP_RIVE_USE_DAWN |
| 77 | + Enables the use of the Dawn renderer on platform that support it. |
| 78 | +*/ |
| 79 | +#ifndef YUP_RIVE_USE_DAWN |
| 80 | +#define YUP_RIVE_USE_DAWN 0 |
| 81 | +#endif |
| 82 | + |
| 83 | +//============================================================================== |
| 84 | +/** Config: YUP_RIVE_OPENGL_MAJOR |
| 85 | + Enables a speficic OpenGL major version. Must be at least 4. |
| 86 | +*/ |
| 87 | +#ifndef YUP_RIVE_OPENGL_MAJOR |
| 88 | +#define YUP_RIVE_OPENGL_MAJOR 4 |
| 89 | +#endif |
| 90 | + |
| 91 | +/** Config: YUP_RIVE_OPENGL_MINOR |
| 92 | + Enables a speficic OpenGL minor version. Must be at least 2. |
| 93 | +*/ |
| 94 | +#ifndef YUP_RIVE_OPENGL_MINOR |
| 95 | +#define YUP_RIVE_OPENGL_MINOR 2 |
| 96 | +#endif |
| 97 | + |
| 98 | +//============================================================================== |
| 99 | + |
| 100 | +#if YUP_RIVE_USE_OPENGL |
| 101 | +#if __APPLE__ && !YUP_RIVE_USE_METAL && !YUP_RIVE_USE_DAWN |
| 102 | +#error Must select at least one between YUP_RIVE_USE_METAL, YUP_RIVE_USE_OPENGL or YUP_RIVE_USE_DAWN |
| 103 | +#elif _WIN32 && !YUP_RIVE_USE_D3D && !YUP_RIVE_USE_DAWN |
| 104 | +#error Must select at least one between YUP_RIVE_USE_D3D, YUP_RIVE_USE_OPENGL or YUP_RIVE_USE_DAWN |
| 105 | +#endif |
| 106 | + |
| 107 | +#if !defined(RIVE_DESKTOP_GL) && !defined(RIVE_WEBGL) |
| 108 | +#define RIVE_DESKTOP_GL 1 |
| 109 | +#endif |
| 110 | +#endif |
| 111 | + |
| 112 | +#if YUP_RIVE_USE_DAWN |
| 113 | +#if !defined(RIVE_DAWN) |
| 114 | +#define RIVE_DAWN 1 |
| 115 | +#endif |
| 116 | +#endif |
0 commit comments