Text Editor: Add GLSL support language #116793

Closed
Gangneron wants to merge 68 commits from Gangneron/blender:Add_GLSL into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 6 additions and 4 deletions
Showing only changes of commit 2b7f04f280 - Show all commits

View File

@ -8,7 +8,7 @@
#include <cstring>
#include "BLI_blendlib.h"
#include "BLI_blenlib.h"
#include "DNA_space_types.h"
Gangneron marked this conversation as resolved
Review

This header doesn't exist.

This header doesn't exist.
#include "DNA_text_types.h"
@ -21,7 +21,7 @@
/* Define all keywords who can use
*/
Gangneron marked this conversation as resolved Outdated
Use doxy-sections, https://developer.blender.org/docs/handbook/guidelines/c_cpp/#comment-sections
static const textformat_glsl_literals_builtinfunc_data[] = {
static const char *text_format_osl_literals_builtinfunc_data[] = {
/* clang-format off */
"attribute"
Gangneron marked this conversation as resolved Outdated

Wrong type.

Wrong type.
"bool"
Gangneron marked this conversation as resolved Outdated

I don't know what this Array is. And why is it with uppercase A?

I don't know what this `Array` is. And why is it with uppercase `A`?
@ -129,7 +129,8 @@ static const Span<const char *> textformat_glsl_literals_builtinfunc(
textformat_glsl_literals_builtinfunc_data,
ARRAY_SIZE(textformat_glsl_literals_builtinfunc_data));
static const char * text_format_glsl_literals_reserved_data[] = {
static const char * text_format_glsl_literals_reserved_data[]
{
/* clang-format off */
"abs"
"acos"
@ -321,7 +322,8 @@ 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[] = {
static const char *text_format_glsl_literals_specialvar_data[]
{
/* Force single column , sorted list */
/* clang-format off */
"displacement",