diff options
-rw-r--r-- | src/glean/tglsl1.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index 1f2f73c..1a9e803 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -2946,6 +2946,70 @@ static const ShaderProgram Programs[] = { FLAG_NONE }, + { + "Comment test (1)", + NO_VERTEX_SHADER, + "/* this is\n" + "a multi-line\n" + "comment*/\n" + "void main() { \n" + " gl_FragColor = vec4(0.5); \n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "Comment test (2)", + NO_VERTEX_SHADER, + "// another comment test\n" + "void main() { \n" + " gl_FragColor = vec4(0.5); //comment \n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "Comment test (3)", + NO_VERTEX_SHADER, + "#define HALF 0.5 // half\n" + "void main() { \n" + " gl_FragColor = vec4(HALF); \n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "Comment test (4)", + NO_VERTEX_SHADER, + "#define HALF 0.5 /* half */\n" + "void main() { \n" + " gl_FragColor = vec4(HALF); \n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "Comment test (5)", + NO_VERTEX_SHADER, + "void main() { \n" + "/*}*/\n" + " gl_FragColor = /*;*/ vec4(0.5); \n" + "/*}*/\n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + // Illegal shaders ================================================== { "undefined variable", |