public virtual void Load(int width, int height) { Width = width; Height = height; _page = new Texture(); GUIShader = Assets.Fetch<ShaderProgram>("GUI"); GUIShader.AddUniform("scale"); VBO = new VBO<VertexPositionNormalTexture>(); VAO = new VAO<VertexPositionNormalTexture>(); VBO.Buffer(new[]{ new VertexPositionNormalTexture{Position = new Vector3(0, Height, 0f),Normal = Vector3.UnitZ,TexCoord = new Vector2(0, Height)}, new VertexPositionNormalTexture{Position = new Vector3(Width, Height, 0f),Normal = Vector3.UnitZ,TexCoord = new Vector2(Width, Height)}, new VertexPositionNormalTexture{Position = new Vector3(Width, 0, 0f),Normal = Vector3.UnitZ,TexCoord = new Vector2(Width, 0)}, new VertexPositionNormalTexture{Position = new Vector3(0, 0, 0),Normal = Vector3.UnitZ,TexCoord = new Vector2(0,0)} }); VAO.Setup(GUIShader, VBO); _webView = WebCore.CreateWebView(Width, Height); WebCore.BaseDirectory = Path.Combine(Directory.GetCurrentDirectory(), "GUI"); _webView.FlushAlpha = false; _webView.IsTransparent = true; _webView.CreateObject("console"); _webView.SetObjectCallback("console", "log", (sender, e) => Bus.Add(new DebugMessage(Timer.LastTickTime, e.Arguments[0].ToString()))); _webView.CreateObject("GUI"); _webView.CreateObject("Bus"); _webView.LoadFile("index.htm"); }