diff options
author | chai <chaifix@163.com> | 2021-11-20 17:32:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-20 17:32:55 +0800 |
commit | bb452bba78dc1870d6316b383180472fe3a8a06a (patch) | |
tree | 6084d6c608e00f28fe4b1437e0df228d68c268de /Data/Scripts | |
parent | 74ca8143a7c2352425d549b681b2838bda5ee218 (diff) |
*gui
Diffstat (limited to 'Data/Scripts')
-rw-r--r-- | Data/Scripts/EditorResources.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Data/Scripts/EditorResources.lua b/Data/Scripts/EditorResources.lua index c9d2e77..bcefec4 100644 --- a/Data/Scripts/EditorResources.lua +++ b/Data/Scripts/EditorResources.lua @@ -1,9 +1,27 @@ +-- 编辑器用到的资源
local find = GameLab.Find
+local Shader = find "GameLab.Engine.Rendering.Shader"
+local Texture = find "GameLab.Engine.Rendering.Texture"
+local Rendering = find "GameLab.Engine.Rendering"
+
+local SHADER = function(path)
+ local file = 'Resources/Shaders/' .. path
+ return Rendering.CreateShaderFromFile(file)
+end
+
+local TEXTURE = function(path)
+ -- local file = define.builtInPath .. '/Resources/Images/' .. path
+ -- return Rendering.CreateShaderFromFile(file)
+end
local res = {}
local loadRes = function()
-
+ res.shaders = {
+ ["EditorShape"] = SHADER "Editor-Shape.glsl",
+ ["EditorText"] = SHADER "Editor-Text.glsl",
+ ["EditorUI"] = SHADER "Editor-UI.glsl",
+ }
end
GameLab.onApplicationStart:Add(loadRes)
|