forked from SaschaWillems/Vulkan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.h
190 lines (141 loc) · 5.05 KB
/
examples.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/*
* examples.h
*
* Copyright (c) 2016-2017 The Brenwill Workshop Ltd.
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*
*
* Loads the appropriate example code, as indicated by the appropriate compiler build setting below.
*
* To select an example to run, define one (and only one) of the macros below, either by
* adding a #define XXX statement at the top of this file, or more flexibily, by adding the
* macro value to the Preprocessor Macros (aka GCC_PREPROCESSOR_DEFINITIONS) compiler setting.
*
* To add a compiler setting, select the project in the Xcode Project Navigator panel,
* select the Build Settings panel, and add the value to the Preprocessor Macros
* (aka GCC_PREPROCESSOR_DEFINITIONS) entry.
*
* For example, to run the pipelines example, you would add the MVK_pipelines define macro
* to the Preprocessor Macros (aka GCC_PREPROCESSOR_DEFINITIONS) entry of the Xcode project,
* overwriting any otheor value there.
*
* If you choose to add a #define statement to this file, be sure to clear the existing macro
* from the Preprocessor Macros (aka GCC_PREPROCESSOR_DEFINITIONS) compiler setting in Xcode.
*/
// In the list below, the comments indicate entries that,
// under certain conditions, that may not run as expected.
#define MVK_vulkanscene
// BASICS
#ifdef MVK_pipelines
# include "../examples/pipelines/pipelines.cpp"
#endif
#ifdef MVK_texture
# include "../examples/texture/texture.cpp"
#endif
// Does not run. Metal does not support passing matrices between shader stages.
#ifdef MVK_texturecubemap
# include "../examples/texturecubemap/texturecubemap.cpp"
#endif
// Runs in Release mode. Does not run in Debug mode, as Metal validation will
// assert that UBO buffer length is too short for UBO size declared in shader.
#ifdef MVK_texturearray
# include "../examples/texturearray/texturearray.cpp"
#endif
#ifdef MVK_mesh
# include "../examples/mesh/mesh.cpp"
#endif
#ifdef MVK_dynamicuniformbuffer
# include "../examples/dynamicuniformbuffer/dynamicuniformbuffer.cpp"
#endif
// Does not run. Metal does not support passing arrays between shader stages.
#ifdef MVK_pushconstants
# include "../examples/pushconstants/pushconstants.cpp"
#endif
#ifdef MVK_specializationconstants
# include "../examples/specializationconstants/specializationconstants.cpp"
#endif
#ifdef MVK_offscreen
# include "../examples/offscreen/offscreen.cpp"
#endif
#ifdef MVK_radialblur
# include "../examples/radialblur/radialblur.cpp"
#endif
#ifdef MVK_textoverlay
# include "../examples/textoverlay/textoverlay.cpp"
#endif
#ifdef MVK_particlefire
# include "../examples/particlefire/particlefire.cpp"
#endif
// ADVANCED
#ifdef MVK_multithreading
# include "../examples/multithreading/multithreading.cpp"
#endif
#ifdef MVK_scenerendering
# include "../examples/scenerendering/scenerendering.cpp"
#endif
#ifdef MVK_instancing
# include "../examples/instancing/instancing.cpp"
#endif
#ifdef MVK_indirectdraw
# include "../examples/indirectdraw/indirectdraw.cpp"
#endif
// Does not run. Metal does not support passing matrices between shader stages.
#ifdef MVK_hdr
# include "../examples/hdr/hdr.cpp"
#endif
#ifdef MVK_occlusionquery
# include "../examples/occlusionquery/occlusionquery.cpp"
#endif
// Does not run. Sampler arrays require Metal 2.
#ifdef MVK_texturemipmapgen
# include "../examples/texturemipmapgen/texturemipmapgen.cpp"
#endif
#ifdef MVK_multisampling
# include "../examples/multisampling/multisampling.cpp"
#endif
#ifdef MVK_shadowmapping
# include "../examples/shadowmapping/shadowmapping.cpp"
#endif
#ifdef MVK_shadowmappingomni
# include "../examples/shadowmappingomni/shadowmappingomni.cpp"
#endif
#ifdef MVK_skeletalanimation
# include "../examples/skeletalanimation/skeletalanimation.cpp"
#endif
#ifdef MVK_bloom
# include "../examples/bloom/bloom.cpp"
#endif
// Runs in Release mode. Debug mode Metal validation will assert
// UBO buffer length is too short for UBO size declared in shader.
#ifdef MVK_deferred
# include "../examples/deferred/deferred.cpp"
#endif
// Does not run. Metal does not support geometry shaders.
#ifdef MVK_deferredshadows
# include "../examples/deferredshadows/deferredshadows.cpp"
#endif
// Runs in Release mode, but does not display content.
// Metal does not support the use of specialization constants to set array lengths,
#ifdef MVK_ssao
# include "../examples/ssao/ssao.cpp"
#endif
// COMPUTE - Currently unsupported by MoltenVK
// TESSELLATION - Currently unsupported by MoltenVK
// GEOMETRY SHADER - Unsupported by Metal
// EXTENSIONS - Currently unsupported by MoltenVK
// MISC
#ifdef MVK_parallaxmapping
# include "../examples/parallaxmapping/parallaxmapping.cpp"
#endif
#ifdef MVK_sphericalenvmapping
# include "../examples/sphericalenvmapping/sphericalenvmapping.cpp"
#endif
#ifdef MVK_gears
# include "../examples/gears/gears.cpp"
#endif
#ifdef MVK_distancefieldfonts
# include "../examples/distancefieldfonts/distancefieldfonts.cpp"
#endif
#ifdef MVK_vulkanscene
# include "../examples/vulkanscene/vulkanscene.cpp"
#endif