https://github.com/shader-slang/slang
Raw File
Tip revision: ee47232fc17f31ef2bd95ca480372216a79def56 authored by jsmall-nvidia on 04 May 2018, 16:00:53 UTC
Use Surface for screen capture in Renderer interface (#551)
Tip revision: ee47232
undef.slang
//TEST:SIMPLE:
// #undef support

// warning: undef of something not defined
#undef FOO

#define BAR 1.0f

float foo() { return BAR + 2.0; }

#ifdef BAR
// okay
#else
#error not okay
#endif

#undef BAR

typedef float BAR;

BAR bar() { return 2.0; }

#if !defined(BAR)
// okay
#else
#error not okay
#endif


#define FOO

#undef FOO
back to top