yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
029672ee0
master
1#ifndef SLANG_CPP_HOST_PRELUDE_H 2#define SLANG_CPP_HOST_PRELUDE_H 3 4#include <cmath> 5#include <cstdio> 6#include <cstring> 7 8#define SLANG_COM_PTR_ENABLE_REF_OPERATOR 1 9 10#include "../source/slang-rt/slang-rt.h" 11#include "slang-com-ptr.h" 12#include "slang-cpp-types.h" 13 14#ifdef SLANG_LLVM 15#include "slang-llvm.h" 16#else // SLANG_LLVM 17#if SLANG_GCC_FAMILY && __GNUC__ < 6 18#include <cmath> 19#define SLANG_PRELUDE_STD std:: 20#else 21#include <math.h> 22#define SLANG_PRELUDE_STD 23#endif 24 25#include <assert.h> 26#include <stdint.h> 27#include <stdlib.h> 28#include <string.h> 29#endif // SLANG_LLVM 30 31// Is intptr_t not equal to equal-width sized integer type? 32#if defined(__APPLE__ ) 33#define SLANG_INTPTR_TYPE_IS_DISTINCT 1 34#else 35#define SLANG_INTPTR_TYPE_IS_DISTINCT 0 36#endif 37 38#if defined(_MSC_VER ) 39#define SLANG_PRELUDE_SHARED_LIB_EXPORT __declspec(dllexport) 40#else 41#define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__((__visibility__("default"))) 42// # define SLANG_PRELUDE_SHARED_LIB_EXPORT __attribute__ ((dllexport)) 43// __attribute__((__visibility__("default"))) 44#endif 45 46#ifdef __cplusplus 47#define SLANG_PRELUDE_EXTERN_C extern "C" 48#define SLANG_PRELUDE_EXTERN_C_START \ 49 extern "C" \ 50 { 51#define SLANG_PRELUDE_EXTERN_C_END } 52#else 53#define SLANG_PRELUDE_EXTERN_C 54#define SLANG_PRELUDE_EXTERN_C_START 55#define SLANG_PRELUDE_EXTERN_C_END 56#endif 57 58#include "slang-cpp-scalar-intrinsics.h" 59 60using namespace Slang ; 61 62template < typename TResult ,typename ...Args > 63using Slang_FuncType = TResult (SLANG_MCALL * )(Args...); 64 65#endif