aboutsummaryrefslogtreecommitdiff
path: root/src/libjin-lua/scripts/graphics/graphics.lua
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-09-13 15:08:43 +0800
committerchai <chaifix@163.com>2019-09-13 15:08:43 +0800
commit20535cb86266d7a4828009f3ddca42e35269b9e2 (patch)
tree796e77e4a34ed52b6c92fb58ec432c69ed4232e1 /src/libjin-lua/scripts/graphics/graphics.lua
parent695eadc9d2a6d2f499b24ee6858325f6e22da077 (diff)
*格式化代码
Diffstat (limited to 'src/libjin-lua/scripts/graphics/graphics.lua')
-rw-r--r--src/libjin-lua/scripts/graphics/graphics.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libjin-lua/scripts/graphics/graphics.lua b/src/libjin-lua/scripts/graphics/graphics.lua
index beb5712..2388b52 100644
--- a/src/libjin-lua/scripts/graphics/graphics.lua
+++ b/src/libjin-lua/scripts/graphics/graphics.lua
@@ -147,6 +147,15 @@ jg.reset = function()
jg.unuseShader()
end
+local _useshader = jg.useShader
+jg.useShader = function(shader)
+ if shader == nil then
+ jg.unuseShader()
+ return
+ end
+ _useshader(shader)
+end
+
jg.unuseShader = function()
jg.useShader(jg.Shaders.Default)
end
@@ -173,4 +182,4 @@ jg.newShaderf = function(file)
else
return shader
end
-end
+end \ No newline at end of file