aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/JSL.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-02 00:48:21 +0800
committerchai <chaifix@163.com>2018-09-02 00:48:21 +0800
commit862763a88f6b4a6cb6c034287c509a91776adf8b (patch)
tree78c1f391c1c5ed95acfda055e3bf806290df74d8 /src/libjin/Graphics/JSL.cpp
parentb05e2443533af8e3badb4a8469a634cb302c63f8 (diff)
*update
Diffstat (limited to 'src/libjin/Graphics/JSL.cpp')
-rw-r--r--src/libjin/Graphics/JSL.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/libjin/Graphics/JSL.cpp b/src/libjin/Graphics/JSL.cpp
index 2ab7ceb..fb6279a 100644
--- a/src/libjin/Graphics/JSL.cpp
+++ b/src/libjin/Graphics/JSL.cpp
@@ -7,20 +7,21 @@ namespace jin
{
namespace graphics
{
- //vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords)
- static const char* base_f = " "
- //"#version 120 \n"
- "#define number float \n"
- "#define Image sampler2D \n"
- "#define Canvas sampler2D \n"
- "#define Color vec4 \n"
- "#define Texel texture2D \n"
- "#define extern uniform \n"
- "uniform Image _tex0_; \n"
- "%s \n"
- "void main(){ \n"
- " gl_FragColor = effect(gl_Color, _tex0_, gl_TexCoord[0].xy, gl_FragCoord.xy);\n"
- "}\0";
+
+ static const char* base_f = R"base_f(
+#define number float
+#define Texture sampler2D
+#define Canvas sampler2D
+#define Color vec4
+#define Texel texture2D
+#define extern uniform
+uniform Texture _tex0_;
+%s
+void main()
+{
+ gl_FragColor = effect(gl_Color, _tex0_, gl_TexCoord[0].xy, gl_FragCoord.xy);
+}
+ )base_f";
/*static*/ JSLProgram* JSLProgram::currentJSLProgram = nullptr;