-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEngineExport.h
More file actions
25 lines (22 loc) · 1017 Bytes
/
Copy pathEngineExport.h
File metadata and controls
25 lines (22 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#ifdef SHADERLAB_ENGINE_EXPORTS
#define SHADERLAB_API __declspec(dllexport)
#else
#define SHADERLAB_API __declspec(dllimport)
#endif
// Engine ABI version. Bumped manually whenever a public engine symbol's
// signature or behavior changes in a way that would break a host built
// against an older header. Independent of `Version.h::VersionMajor` (the
// app version) and `Version.h::GraphFormatVersion` (the JSON schema).
//
// Hosts (the WinUI app, ShaderLabHeadless when it lands, third-party
// consumers if any) should call `ShaderLab_GetAbiVersion()` at startup
// and compare against this constant. Mismatch means the DLL is from a
// different build than the headers and is unsafe to use.
//
// **History** (compatibility-breaking changes):
// 1: Initial. Phase 6.
#define SHADERLAB_ENGINE_ABI_VERSION 1
// C-linkage entry so it can be GetProcAddress'd if a host wants to do a
// version check before dynamically loading the DLL.
extern "C" SHADERLAB_API uint32_t ShaderLab_GetAbiVersion();