Text Editor: Add GLSL support language #116793
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
Gangneron marked this conversation as resolved
Outdated
|
||||
static const char *text_format_glsl_literals_builtinfunc_data[] = {
|
||||
/* Force single column, sorted list. */
|
||||
/* clang-format off */
|
||||
"abs",
|
||||
"acos",
|
||||
"acosh",
|
||||
|
@ -177,6 +178,7 @@ static const char *text_format_glsl_literals_builtinfunc_data[] = {
|
|||
"unpackUnorm2x16",
|
||||
"unpackUnorm4x8",
|
||||
"usubBorrow",
|
||||
/* clang-format on */
|
||||
};
|
||||
static const Span<const char *> text_format_glsl_literals_builtinfunc(
|
||||
text_format_glsl_literals_builtinfunc_data,
|
||||
|
@ -188,6 +190,7 @@ static const Span<const char *> text_format_glsl_literals_builtinfunc(
|
|||
*/
|
||||
static const char *text_format_glsl_literals_reserved_data[] = {
|
||||
/* Force single column, sorted list. */
|
||||
/* clang-format off */
|
||||
"attribute",
|
||||
"bool",
|
||||
Gangneron marked this conversation as resolved
Outdated
Clément Foucault
commented
It's It's `ldexp` not `idexp`. If you did this list by hand, other typos might have slept in. So i would suggest to not do manually and use an official list somewhere like https://docs.gl/sl4/acos (left panel, expand all sections).
|
||||
"break",
|
||||
|
@ -277,8 +280,18 @@ static const char *text_format_glsl_literals_reserved_data[] = {
|
|||
"void",
|
||||
"volatile",
|
||||
"while",
|
||||
/* clang-format on */
|
||||
};
|
||||
static const Span<const char *> text_format_glsl_literals_reserved(
|
||||
text_format_glsl_literals_reserved_data, ARRAY_SIZE(text_format_glsl_literals_reserved_data));
|
||||
|
||||
/* Built-In Variable */
|
||||
/**
|
||||
* GLSL special variables.
|
||||
* https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
|
||||
*/
|
||||
Gangneron marked this conversation as resolved
Outdated
Campbell Barton
commented
Use spaces within C-style comments, e.g. Use spaces within C-style comments, e.g. `/* Built-In Variable */`
Gangneron
commented
normally all comment problems are corrected normally all comment problems are corrected
|
||||
static const char *text_format_glsl_literals_specialvar_data[] = {
|
||||
/* Force single column , sorted list */
|
||||
/* clang-format off */
|
||||
"gl_ClipDistance",
|
||||
"gl_FragCoord",
|
||||
"gl_FragDepth",
|
||||
|
@ -308,17 +321,7 @@ static const char *text_format_glsl_literals_reserved_data[] = {
|
|||
"gl_ViewportIndex",
|
||||
"gl_WorkGroupID",
|
||||
"gl_WorkGroupSize",
|
||||
};
|
||||
static const Span<const char *> text_format_glsl_literals_reserved(
|
||||
text_format_glsl_literals_reserved_data, ARRAY_SIZE(text_format_glsl_literals_reserved_data));
|
||||
|
||||
/* GLSL shader types */
|
||||
static const char *text_format_glsl_literals_specialvar_data[] = {
|
||||
/* Force single column , sorted list */
|
||||
"displacement",
|
||||
"shader",
|
||||
"surface",
|
||||
"volume",
|
||||
/* clang-format on */
|
||||
};
|
||||
static const Span<const char *> text_format_glsl_literals_specialvar(
|
||||
text_format_glsl_literals_specialvar_data,
|
||||
|
|
Loading…
Reference in New Issue
I don't know what this
Array
is. And why is it with uppercaseA
?