local json = require "LiteJson.json" local inspect = require "inspect" local AssetBrowser = require "./Scripts/Editor/AssetBrowser" local EditorWindowManager = require "./Scripts/EditorGUI/EditorWindowManager" local Editor = GameLab.Editor local Engine = GameLab.Engine local Resource = GameLab.Engine.Resource local Rendering = GameLab.Engine.Rendering local Debug = GameLab.Debug local GUI = GameLab.Editor.GUI local GL = GameLab.Engine.GL local app = GameLab.Editor.EditorApplication.New() if app == nil then Debug.LogError("app is nil") end local mainWindow = GUI.ContainerWindow.New({400, 400, 800, 500}, GUI.EShowMode.MainWindow, {100, 100}, {700, 700}) mainWindow:SetTitle("GameLab") mainWindow:SetIcon("./Data/Icon/GameLab.ico") app:SetMainWindow(mainWindow) local guiWindow = GUI.GUIWindow.New() guiWindow:SetContainerWindow(mainWindow) guiWindow:SetPosition({0,0, 400, 400}) collectgarbage() local wnd = AssetBrowser.New() guiWindow:SetInstance(wnd) local v = GameLab.Engine.Math.Vector4.New(1,2,3,4) local c = Engine.Rendering.Color.New(1,1,1,1) GL.ClearColor({1,1,1,1}) GL.Clear(GL.EBufferType.ColorBuffer) local files = { "README.txt", "README.txt", "README.txt", "README.txt", "README.txt", "README.txt", "README.txt", "README.txt", "README.txt", } local imgData = Engine.Resource.LoadImageData("./Resources/Images/brickwall.jpg") local tex = Engine.Resource.LoadTexture("./Resources/Images/brickwall.jpg") local request = Engine.Resource.LoadImageDataAsync("./Resources/Images/brickwall.jpg") local vsh = [[ #version 330 core layout (location = 0) in vec3 aPos; layout (location = 1) in vec3 aColor; layout (location = 2) in vec2 aTexCoord; out vec3 ourColor; out vec2 TexCoord; void main() { gl_Position = vec4(aPos, 1.0); ourColor = aColor; TexCoord = vec2(aTexCoord.x, aTexCoord.y); } ]] local fsh = [[ #version 330 core out vec4 FragColor; in vec3 ourColor; in vec2 TexCoord; uniform float mixValue; // texture samplers uniform sampler2D texture1; uniform sampler2D texture2; void main() { // linearly interpolate between both textures FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), mixValue); } ]] BeforeMainLoop() local font = Engine.GUI.Font.New("./Resources/Font/msyh.ttc", {512, 512}, 5, 5) _G["default_font"] = font while true do app:OnStep() app:PullMessage() end