config.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. /*
  2. * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
  3. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
  4. */
  5. #ifndef BGFX_CONFIG_H_HEADER_GUARD
  6. #define BGFX_CONFIG_H_HEADER_GUARD
  7. #include <bx/bx.h> // bx::isPowerOf2
  8. // # Configuration options for bgfx.
  9. //
  10. // Any of `BGFX_CONFIG_*` options that's inside `#ifndef` block can be configured externally
  11. // via compiler options.
  12. //
  13. // When selecting rendering backends select all backends you want to include in the build.
  14. #ifndef BX_CONFIG_DEBUG
  15. # error "BX_CONFIG_DEBUG must be defined in build script!"
  16. #endif // BX_CONFIG_DEBUG
  17. #if !defined(BGFX_CONFIG_RENDERER_AGC) \
  18. && !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \
  19. && !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \
  20. && !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \
  21. && !defined(BGFX_CONFIG_RENDERER_GNM) \
  22. && !defined(BGFX_CONFIG_RENDERER_METAL) \
  23. && !defined(BGFX_CONFIG_RENDERER_NVN) \
  24. && !defined(BGFX_CONFIG_RENDERER_OPENGL) \
  25. && !defined(BGFX_CONFIG_RENDERER_OPENGLES) \
  26. && !defined(BGFX_CONFIG_RENDERER_VULKAN) \
  27. && !defined(BGFX_CONFIG_RENDERER_WEBGPU)
  28. # ifndef BGFX_CONFIG_RENDERER_AGC
  29. # define BGFX_CONFIG_RENDERER_AGC (0 \
  30. || BX_PLATFORM_PS5 \
  31. ? 1 : 0)
  32. # endif // BGFX_CONFIG_RENDERER_AGC
  33. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D9
  34. # define BGFX_CONFIG_RENDERER_DIRECT3D9 (0 \
  35. || BX_PLATFORM_LINUX \
  36. || BX_PLATFORM_WINDOWS \
  37. ? 1 : 0)
  38. # endif // BGFX_CONFIG_RENDERER_DIRECT3D9
  39. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D11
  40. # define BGFX_CONFIG_RENDERER_DIRECT3D11 (0 \
  41. || BX_PLATFORM_LINUX \
  42. || BX_PLATFORM_WINDOWS \
  43. || BX_PLATFORM_WINRT \
  44. || BX_PLATFORM_XBOXONE \
  45. ? 1 : 0)
  46. # endif // BGFX_CONFIG_RENDERER_DIRECT3D11
  47. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D12
  48. # define BGFX_CONFIG_RENDERER_DIRECT3D12 (0 \
  49. || BX_PLATFORM_LINUX \
  50. || BX_PLATFORM_WINDOWS \
  51. || BX_PLATFORM_WINRT \
  52. || BX_PLATFORM_XBOXONE \
  53. ? 1 : 0)
  54. # endif // BGFX_CONFIG_RENDERER_DIRECT3D12
  55. # ifndef BGFX_CONFIG_RENDERER_GNM
  56. # define BGFX_CONFIG_RENDERER_GNM (0 \
  57. || BX_PLATFORM_PS4 \
  58. ? 1 : 0)
  59. # endif // BGFX_CONFIG_RENDERER_GNM
  60. # ifndef BGFX_CONFIG_RENDERER_METAL
  61. # define BGFX_CONFIG_RENDERER_METAL (0 \
  62. || (BX_PLATFORM_IOS && BX_CPU_ARM) \
  63. || (BX_PLATFORM_IOS && BX_CPU_X86) \
  64. || (BX_PLATFORM_OSX >= 101100) \
  65. ? 1 : 0)
  66. # endif // BGFX_CONFIG_RENDERER_METAL
  67. # ifndef BGFX_CONFIG_RENDERER_NVN
  68. # define BGFX_CONFIG_RENDERER_NVN (0 \
  69. || BX_PLATFORM_NX \
  70. ? 1 : 0)
  71. # endif // BGFX_CONFIG_RENDERER_NVN
  72. # ifndef BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION
  73. # define BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION 1
  74. # endif // BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION
  75. # ifndef BGFX_CONFIG_RENDERER_OPENGL
  76. # define BGFX_CONFIG_RENDERER_OPENGL (0 \
  77. || BX_PLATFORM_BSD \
  78. || BX_PLATFORM_LINUX \
  79. || BX_PLATFORM_OSX \
  80. || BX_PLATFORM_WINDOWS \
  81. ? BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION : 0)
  82. # endif // BGFX_CONFIG_RENDERER_OPENGL
  83. # ifndef BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION
  84. # define BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION (0 \
  85. || BX_PLATFORM_ANDROID \
  86. ? 30 : 1)
  87. # endif // BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION
  88. # ifndef BGFX_CONFIG_RENDERER_OPENGLES
  89. # define BGFX_CONFIG_RENDERER_OPENGLES (0 \
  90. || BX_PLATFORM_ANDROID \
  91. || BX_PLATFORM_EMSCRIPTEN \
  92. || BX_PLATFORM_IOS \
  93. || BX_PLATFORM_RPI \
  94. || BX_PLATFORM_NX \
  95. ? BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION : 0)
  96. # endif // BGFX_CONFIG_RENDERER_OPENGLES
  97. # ifndef BGFX_CONFIG_RENDERER_VULKAN
  98. # define BGFX_CONFIG_RENDERER_VULKAN (0 \
  99. || BX_PLATFORM_ANDROID \
  100. || BX_PLATFORM_LINUX \
  101. || BX_PLATFORM_WINDOWS \
  102. || BX_PLATFORM_NX \
  103. || BX_PLATFORM_OSX \
  104. ? 1 : 0)
  105. # endif // BGFX_CONFIG_RENDERER_VULKAN
  106. # ifndef BGFX_CONFIG_RENDERER_WEBGPU
  107. # define BGFX_CONFIG_RENDERER_WEBGPU 0
  108. # endif // BGFX_CONFIG_RENDERER_WEBGPU
  109. #else
  110. # ifndef BGFX_CONFIG_RENDERER_AGC
  111. # define BGFX_CONFIG_RENDERER_AGC 0
  112. # endif // BGFX_CONFIG_RENDERER_AGC
  113. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D9
  114. # define BGFX_CONFIG_RENDERER_DIRECT3D9 0
  115. # endif // BGFX_CONFIG_RENDERER_DIRECT3D9
  116. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D11
  117. # define BGFX_CONFIG_RENDERER_DIRECT3D11 0
  118. # endif // BGFX_CONFIG_RENDERER_DIRECT3D11
  119. # ifndef BGFX_CONFIG_RENDERER_DIRECT3D12
  120. # define BGFX_CONFIG_RENDERER_DIRECT3D12 0
  121. # endif // BGFX_CONFIG_RENDERER_DIRECT3D12
  122. # ifndef BGFX_CONFIG_RENDERER_GNM
  123. # define BGFX_CONFIG_RENDERER_GNM 0
  124. # endif // BGFX_CONFIG_RENDERER_GNM
  125. # ifndef BGFX_CONFIG_RENDERER_METAL
  126. # define BGFX_CONFIG_RENDERER_METAL 0
  127. # endif // BGFX_CONFIG_RENDERER_METAL
  128. # ifndef BGFX_CONFIG_RENDERER_NVN
  129. # define BGFX_CONFIG_RENDERER_NVN 0
  130. # endif // BGFX_CONFIG_RENDERER_NVN
  131. # ifndef BGFX_CONFIG_RENDERER_OPENGL
  132. # define BGFX_CONFIG_RENDERER_OPENGL 0
  133. # endif // BGFX_CONFIG_RENDERER_OPENGL
  134. # ifndef BGFX_CONFIG_RENDERER_OPENGLES
  135. # define BGFX_CONFIG_RENDERER_OPENGLES 0
  136. # endif // BGFX_CONFIG_RENDERER_OPENGLES
  137. # ifndef BGFX_CONFIG_RENDERER_VULKAN
  138. # define BGFX_CONFIG_RENDERER_VULKAN 0
  139. # endif // BGFX_CONFIG_RENDERER_VULKAN
  140. # ifndef BGFX_CONFIG_RENDERER_WEBGPU
  141. # define BGFX_CONFIG_RENDERER_WEBGPU 0
  142. # endif // BGFX_CONFIG_RENDERER_VULKAN
  143. #endif // !defined...
  144. #if BGFX_CONFIG_RENDERER_OPENGL && BGFX_CONFIG_RENDERER_OPENGL < 21
  145. # undef BGFX_CONFIG_RENDERER_OPENGL
  146. # define BGFX_CONFIG_RENDERER_OPENGL 21
  147. #endif // BGFX_CONFIG_RENDERER_OPENGL && BGFX_CONFIG_RENDERER_OPENGL < 21
  148. #if BGFX_CONFIG_RENDERER_OPENGLES && BGFX_CONFIG_RENDERER_OPENGLES < 20
  149. # undef BGFX_CONFIG_RENDERER_OPENGLES
  150. # define BGFX_CONFIG_RENDERER_OPENGLES 20
  151. #endif // BGFX_CONFIG_RENDERER_OPENGLES && BGFX_CONFIG_RENDERER_OPENGLES < 20
  152. #if BGFX_CONFIG_RENDERER_OPENGL && BGFX_CONFIG_RENDERER_OPENGLES
  153. # error "Can't define both BGFX_CONFIG_RENDERER_OPENGL and BGFX_CONFIG_RENDERER_OPENGLES"
  154. #endif // BGFX_CONFIG_RENDERER_OPENGL && BGFX_CONFIG_RENDERER_OPENGLES
  155. /// Enable use of extensions.
  156. #ifndef BGFX_CONFIG_RENDERER_USE_EXTENSIONS
  157. # define BGFX_CONFIG_RENDERER_USE_EXTENSIONS 1
  158. #endif // BGFX_CONFIG_RENDERER_USE_EXTENSIONS
  159. /// Enable use of tinystl.
  160. #ifndef BGFX_CONFIG_USE_TINYSTL
  161. # define BGFX_CONFIG_USE_TINYSTL 1
  162. #endif // BGFX_CONFIG_USE_TINYSTL
  163. /// Enable nVidia PerfHUD integration.
  164. #ifndef BGFX_CONFIG_DEBUG_PERFHUD
  165. # define BGFX_CONFIG_DEBUG_PERFHUD 0
  166. #endif // BGFX_CONFIG_DEBUG_NVPERFHUD
  167. /// Enable annotation for graphics debuggers.
  168. #ifndef BGFX_CONFIG_DEBUG_ANNOTATION
  169. # define BGFX_CONFIG_DEBUG_ANNOTATION BGFX_CONFIG_DEBUG
  170. #endif // BGFX_CONFIG_DEBUG_ANNOTATION
  171. /// Enable DX11 object names.
  172. #ifndef BGFX_CONFIG_DEBUG_OBJECT_NAME
  173. # define BGFX_CONFIG_DEBUG_OBJECT_NAME BGFX_CONFIG_DEBUG_ANNOTATION
  174. #endif // BGFX_CONFIG_DEBUG_OBJECT_NAME
  175. /// Enable uniform debug checks.
  176. #ifndef BGFX_CONFIG_DEBUG_UNIFORM
  177. # define BGFX_CONFIG_DEBUG_UNIFORM BGFX_CONFIG_DEBUG
  178. #endif // BGFX_CONFIG_DEBUG_UNIFORM
  179. /// Enable occlusion debug checks.
  180. #ifndef BGFX_CONFIG_DEBUG_OCCLUSION
  181. # define BGFX_CONFIG_DEBUG_OCCLUSION BGFX_CONFIG_DEBUG
  182. #endif // BGFX_CONFIG_DEBUG_OCCLUSION
  183. #ifndef BGFX_CONFIG_MULTITHREADED
  184. # define BGFX_CONFIG_MULTITHREADED ( (0 == BX_PLATFORM_EMSCRIPTEN) ? 1 : 0)
  185. #endif // BGFX_CONFIG_MULTITHREADED
  186. #ifndef BGFX_CONFIG_MAX_DRAW_CALLS
  187. # define BGFX_CONFIG_MAX_DRAW_CALLS ( (64<<10)-1)
  188. #endif // BGFX_CONFIG_MAX_DRAW_CALLS
  189. #ifndef BGFX_CONFIG_MAX_BLIT_ITEMS
  190. # define BGFX_CONFIG_MAX_BLIT_ITEMS (1<<10)
  191. #endif // BGFX_CONFIG_MAX_BLIT_ITEMS
  192. #ifndef BGFX_CONFIG_MAX_MATRIX_CACHE
  193. # define BGFX_CONFIG_MAX_MATRIX_CACHE (BGFX_CONFIG_MAX_DRAW_CALLS+1)
  194. #endif // BGFX_CONFIG_MAX_MATRIX_CACHE
  195. #ifndef BGFX_CONFIG_MAX_RECT_CACHE
  196. # define BGFX_CONFIG_MAX_RECT_CACHE (4<<10)
  197. #endif // BGFX_CONFIG_MAX_RECT_CACHE
  198. #ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH
  199. # define BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH 32
  200. #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH
  201. #ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ
  202. # define BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ 20
  203. #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ
  204. #ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM
  205. # define BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM 9
  206. #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM
  207. // Cannot be configured via compiler options.
  208. #define BGFX_CONFIG_MAX_PROGRAMS (1<<BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM)
  209. BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_PROGRAMS), "BGFX_CONFIG_MAX_PROGRAMS must be power of 2.");
  210. #ifndef BGFX_CONFIG_MAX_VIEWS
  211. # define BGFX_CONFIG_MAX_VIEWS 256
  212. #endif // BGFX_CONFIG_MAX_VIEWS
  213. BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_VIEWS), "BGFX_CONFIG_MAX_VIEWS must be power of 2.");
  214. #define BGFX_CONFIG_MAX_VIEW_NAME_RESERVED 6
  215. #ifndef BGFX_CONFIG_MAX_VIEW_NAME
  216. # define BGFX_CONFIG_MAX_VIEW_NAME 256
  217. #endif // BGFX_CONFIG_MAX_VIEW_NAME
  218. #ifndef BGFX_CONFIG_MAX_VERTEX_LAYOUTS
  219. # define BGFX_CONFIG_MAX_VERTEX_LAYOUTS 64
  220. #endif // BGFX_CONFIG_MAX_VERTEX_LAYOUTS
  221. #ifndef BGFX_CONFIG_MAX_INDEX_BUFFERS
  222. # define BGFX_CONFIG_MAX_INDEX_BUFFERS (4<<10)
  223. #endif // BGFX_CONFIG_MAX_INDEX_BUFFERS
  224. #ifndef BGFX_CONFIG_MAX_VERTEX_BUFFERS
  225. # define BGFX_CONFIG_MAX_VERTEX_BUFFERS (4<<10)
  226. #endif // BGFX_CONFIG_MAX_VERTEX_BUFFERS
  227. #ifndef BGFX_CONFIG_MAX_VERTEX_STREAMS
  228. # define BGFX_CONFIG_MAX_VERTEX_STREAMS 4
  229. #endif // BGFX_CONFIG_MAX_VERTEX_STREAMS
  230. #ifndef BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS
  231. # define BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS (4<<10)
  232. #endif // BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS
  233. #ifndef BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS
  234. # define BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS (4<<10)
  235. #endif // BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS
  236. #ifndef BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE
  237. # define BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE (1<<20)
  238. #endif // BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE
  239. #ifndef BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE
  240. # define BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE (3<<20)
  241. #endif // BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE
  242. #ifndef BGFX_CONFIG_MAX_SHADERS
  243. # define BGFX_CONFIG_MAX_SHADERS 512
  244. #endif // BGFX_CONFIG_MAX_FRAGMENT_SHADERS
  245. #ifndef BGFX_CONFIG_MAX_TEXTURES
  246. # define BGFX_CONFIG_MAX_TEXTURES (4<<10)
  247. #endif // BGFX_CONFIG_MAX_TEXTURES
  248. #ifndef BGFX_CONFIG_MAX_TEXTURE_SAMPLERS
  249. # define BGFX_CONFIG_MAX_TEXTURE_SAMPLERS 16
  250. #endif // BGFX_CONFIG_MAX_TEXTURE_SAMPLERS
  251. #ifndef BGFX_CONFIG_MAX_FRAME_BUFFERS
  252. # define BGFX_CONFIG_MAX_FRAME_BUFFERS 128
  253. #endif // BGFX_CONFIG_MAX_FRAME_BUFFERS
  254. #ifndef BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
  255. # define BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS 8
  256. #endif // BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
  257. #ifndef BGFX_CONFIG_MAX_UNIFORMS
  258. # define BGFX_CONFIG_MAX_UNIFORMS 512
  259. #endif // BGFX_CONFIG_MAX_UNIFORMS
  260. #ifndef BGFX_CONFIG_MAX_OCCLUSION_QUERIES
  261. # define BGFX_CONFIG_MAX_OCCLUSION_QUERIES 256
  262. #endif // BGFX_CONFIG_MAX_OCCLUSION_QUERIES
  263. #ifndef BGFX_CONFIG_MIN_RESOURCE_COMMAND_BUFFER_SIZE
  264. # define BGFX_CONFIG_MIN_RESOURCE_COMMAND_BUFFER_SIZE (64<<10)
  265. #endif // BGFX_CONFIG_MIN_RESOURCE_COMMAND_BUFFER_SIZE
  266. #ifndef BGFX_CONFIG_TRANSIENT_VERTEX_BUFFER_SIZE
  267. # define BGFX_CONFIG_TRANSIENT_VERTEX_BUFFER_SIZE (6<<20)
  268. #endif // BGFX_CONFIG_TRANSIENT_VERTEX_BUFFER_SIZE
  269. #ifndef BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE
  270. # define BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE (2<<20)
  271. #endif // BGFX_CONFIG_TRANSIENT_INDEX_BUFFER_SIZE
  272. #ifndef BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT
  273. # define BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT 5
  274. #endif // BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT
  275. #ifndef BGFX_CONFIG_MAX_COLOR_PALETTE
  276. # define BGFX_CONFIG_MAX_COLOR_PALETTE 16
  277. #endif // BGFX_CONFIG_MAX_COLOR_PALETTE
  278. #define BGFX_CONFIG_DRAW_INDIRECT_STRIDE 32
  279. #ifndef BGFX_CONFIG_PROFILER
  280. # define BGFX_CONFIG_PROFILER 0
  281. #endif // BGFX_CONFIG_PROFILER
  282. #ifndef BGFX_CONFIG_RENDERDOC_LOG_FILEPATH
  283. # define BGFX_CONFIG_RENDERDOC_LOG_FILEPATH "temp/bgfx"
  284. #endif // BGFX_CONFIG_RENDERDOC_LOG_FILEPATH
  285. #ifndef BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS
  286. # define BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS { eRENDERDOC_Key_F11 }
  287. #endif // BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS
  288. #ifndef BGFX_CONFIG_API_SEMAPHORE_TIMEOUT
  289. # define BGFX_CONFIG_API_SEMAPHORE_TIMEOUT (5000)
  290. #endif // BGFX_CONFIG_API_SEMAPHORE_TIMEOUT
  291. #ifndef BGFX_CONFIG_MIP_LOD_BIAS
  292. # define BGFX_CONFIG_MIP_LOD_BIAS 0
  293. #endif // BGFX_CONFIG_MIP_LOD_BIAS
  294. #ifndef BGFX_CONFIG_DEFAULT_MAX_ENCODERS
  295. # define BGFX_CONFIG_DEFAULT_MAX_ENCODERS ( (0 != BGFX_CONFIG_MULTITHREADED) ? 8 : 1)
  296. #endif // BGFX_CONFIG_DEFAULT_MAX_ENCODERS
  297. #ifndef BGFX_CONFIG_MAX_BACK_BUFFERS
  298. # define BGFX_CONFIG_MAX_BACK_BUFFERS 4
  299. #endif // BGFX_CONFIG_MAX_BACK_BUFFERS
  300. #ifndef BGFX_CONFIG_MAX_FRAME_LATENCY
  301. # define BGFX_CONFIG_MAX_FRAME_LATENCY 3
  302. #endif // BGFX_CONFIG_MAX_FRAME_LATENCY
  303. #ifndef BGFX_CONFIG_PREFER_DISCRETE_GPU
  304. // On laptops with integrated and discrete GPU, prefer selection of discrete GPU.
  305. // nVidia and AMD, on Windows only.
  306. # define BGFX_CONFIG_PREFER_DISCRETE_GPU BX_PLATFORM_WINDOWS
  307. #endif // BGFX_CONFIG_PREFER_DISCRETE_GPU
  308. #ifndef BGFX_CONFIG_MAX_SCREENSHOTS
  309. # define BGFX_CONFIG_MAX_SCREENSHOTS 4
  310. #endif // BGFX_CONFIG_MAX_SCREENSHOTS
  311. #ifndef BGFX_CONFIG_ENCODER_API_ONLY
  312. # define BGFX_CONFIG_ENCODER_API_ONLY 0
  313. #endif // BGFX_CONFIG_ENCODER_API_ONLY
  314. #endif // BGFX_CONFIG_H_HEADER_GUARD