Use C++11 raw string literals instead of SHADER_SOURCE macro
This is better in many ways:
1. It doesn't confuse clang format
2. \n doesn't need to be included after preprocessor directives like
the version directive.
3. It's using built-in functionality instead of something custom.
Raw string literals should be the preferred way to include shader
source in C++ files going forward.
BUG=angleproject:2157
TEST=angle_end2end_tests
Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f
Reviewed-on: https://chromium-review.googlesource.com/671046
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/tests/gl_tests/DXT1CompressedTextureTest.cpp b/src/tests/gl_tests/DXT1CompressedTextureTest.cpp
index ce53881..dd5baf5 100644
--- a/src/tests/gl_tests/DXT1CompressedTextureTest.cpp
+++ b/src/tests/gl_tests/DXT1CompressedTextureTest.cpp
@@ -28,9 +28,8 @@
{
ANGLETest::SetUp();
- const std::string vsSource = SHADER_SOURCE
- (
- precision highp float;
+ const std::string vsSource =
+ R"(precision highp float;
attribute vec4 position;
varying vec2 texcoord;
@@ -39,20 +38,17 @@
gl_Position = position;
texcoord = (position.xy * 0.5) + 0.5;
texcoord.y = 1.0 - texcoord.y;
- }
- );
+ })";
- const std::string textureFSSource = SHADER_SOURCE
- (
- precision highp float;
+ const std::string textureFSSource =
+ R"(precision highp float;
uniform sampler2D tex;
varying vec2 texcoord;
void main()
{
gl_FragColor = texture2D(tex, texcoord);
- }
- );
+ })";
mTextureProgram = CompileProgram(vsSource, textureFSSource);
if (mTextureProgram == 0)