-
Notifications
You must be signed in to change notification settings - Fork 11
/
Ray.h
47 lines (39 loc) · 1.5 KB
/
Ray.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
#pragma once
#include "Config.h"
#include "Log.h"
#include "RendererBase.h"
/**
@file Ray.h
*/
namespace Ray {
/// Null log, can be used to disable log output
extern LogNull g_null_log;
/// Standard log to stdout
extern LogStdout g_stdout_log;
/// Default renderer flags used to choose backend, by default tries to create gpu renderer first
const Bitmask<eRendererType> DefaultEnabledRenderTypes =
Bitmask<eRendererType>{eRendererType::Reference} | eRendererType::SIMD_SSE2 | eRendererType::SIMD_AVX |
eRendererType::SIMD_AVX2 | eRendererType::SIMD_NEON | eRendererType::Vulkan | eRendererType::DirectX12;
/** @brief Creates renderer
@return pointer to created renderer
*/
RendererBase *CreateRenderer(const settings_t &s, ILog *log = &g_null_log,
Bitmask<eRendererType> enabled_types = DefaultEnabledRenderTypes);
/** @brief Queries available GPU devices
@param log output log
@param out_devices output array of available devices
@param capacity capacity of previous parameter array
@return available devices count (writter into out_devices parameter)
*/
int QueryAvailableGPUDevices(ILog *log, gpu_device_t out_devices[], int capacity);
/** @brief Matches device name using regex pattern
@param name name of the device
@param pattern regex pattern
@return true if name matches pattern
*/
bool MatchDeviceNames(const char *name, const char *pattern);
/** @brief Get version string
@return version string
*/
const char *Version();
} // namespace Ray