From e92caa97329016d012b46b9d37e1b2c3b613a8f2 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 10 Nov 2018 20:13:55 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/embed/graphics.lua.h | 53 -------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/lua/embed/graphics.lua.h (limited to 'src/lua/embed/graphics.lua.h') diff --git a/src/lua/embed/graphics.lua.h b/src/lua/embed/graphics.lua.h deleted file mode 100644 index b2a19b5..0000000 --- a/src/lua/embed/graphics.lua.h +++ /dev/null @@ -1,53 +0,0 @@ -/* graphics.lua */ -static const char* graphics_lua = R"( -jin.graphics = jin.graphics or {} - -local default_shader = nil -local default_shader_source = [[ -#VERTEX_SHADER - -Vertex vert(Vertex v) -{ - return v; -} - -#END_VERTEX_SHADER - -#FRAGMENT_SHADER - -Color frag(Color col, Texture tex, Vertex v) -{ - return col * texel(tex, v.uv); -} - -#END_FRAGMENT_SHADER -]] - -local _init = jin.graphics.init -local initialized = false - -jin.graphics.init = function(setting) - if initialized then - return initialized - end - initialized = _init(setting) - if initialized then - default_shader = jin.graphics.newShader(default_shader_source) - jin.graphics.useShader(default_shader) - end - return initialized -end - -jin.graphics.unuseShader = function() - jin.graphics.useShader(default_shader) -end - --- Reset all attributes to default value. -jin.graphics.reset = function() - jin.graphics.setColor(255, 255, 255, 255) - jin.graphics.setClearColor(0, 0, 0, 255) - jin.graphics.clear() - jin.graphics.unsetFont() -end - -)"; -- cgit v1.1-26-g67d0