Closed jaw closed 4 years ago
Since C++ 11 it's possible to include a text file directly into a C++ multi line string literal like so:
constexpr const char shader_source[] = #include "shaders/shader.glsl" ;
R"str_end( #version 430 ... many lines of code without \n or " around them ... )str_end"
The GLSL plugin marks the first and last lines as an error. Otherwise it syntax highlights the file correctly.
Not to have the error validator consider these as part of the code if present.
Should be easy to implement and help me a LOT! Thanks.
This is technically a CLion issue - str_end is not a real part of the string, it is just a string syntax.
str_end
Please see CPP-12647 instead.
Since C++ 11 it's possible to include a text file directly into a C++ multi line string literal like so:
C++:
shader.glsl:
Notes
What happens now?
The GLSL plugin marks the first and last lines as an error. Otherwise it syntax highlights the file correctly.
What do I want?
Not to have the error validator consider these as part of the code if present.
Should be easy to implement and help me a LOT! Thanks.