# GLSL: #define vs const

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.

• Since glsl is based on the syntax of c, I suspect this question on SO will answer your question. – Sumurai8 Sep 7 '15 at 17:54
• @Samurai8 thank you! Should I delete this question? – Lolums Sep 8 '15 at 17:44
• I think this question is on-topic, but I am not all that familiar with this particular stackexchange. If the question is on-topic, it does not matter it has already an answer on a different SE site; just self-answer this question with what you have learned. – Sumurai8 Sep 9 '15 at 15:14

#define NAME VALUE is a macro, where all instances of NAME are replaced with VALUE by the pre-processor.