blob: 63e80691e0a6d14593826c2d8b0000961cca26ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
-- 编辑器用到的资源
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 GUI = find "GameLab.Engine.GUI"
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 FONT = function(path)
local file = 'Resources/Font/' .. path
return GUI.Font.New(file, {512, 512}, 5, 5)
end
local res = {}
local loadRes = function()
res.shaders = {
["EditorShape"] = SHADER "Editor-Shape.glsl",
["EditorText"] = SHADER "Editor-Text.glsl",
["EditorUI"] = SHADER "Editor-UI.glsl",
}
res.fonts = {
["Default"] = FONT "msyh.ttc"
}
end
GameLab.onApplicationStart:Add(loadRes)
return res
|