What is the difference between #define NAME VALUE and const int NAME = VALUE in GLSL 410 core?
As far as I can see, they both create a constant integer.
What is the difference between #define NAME VALUE and const int NAME = VALUE in GLSL 410 core?
As far as I can see, they both create a constant integer.
#define NAME VALUE is a macro, where all instances of NAME are replaced with VALUE by the pre-processor.
The compiler handles constants. This ensures type safety.