public void Load() { Loader.Load(); Shaders.Load(); OpenSauce.Load(); Chimera.Load(); }
public void Load() { Kernel.Load(); // kernel/loader bin Loader = spv3; // loader bin. Copy static instance to local instance. Deprecate local instance? Shaders.Load(); // kernel bin, load from Kernel.hxe OpenSauce.Load(); // OS_Settings.user.xml Chimera.Load(); // chimera bin }
private IEnumerator DoReloadAssets() { yield return(Shaders.Load()); yield return(ComputeShaders.Load()); yield return(Textures.Load()); }
protected override void OnLoad(EventArgs e) { Shaders.Load(); MSAABuffer = new MsaaFbo(); var renderer = new Gwen.Renderer.OpenTK(); var skinpng = new Texture(renderer); Gwen.Renderer.OpenTK.LoadTextureInternal( skinpng, GameResources.DefaultSkin); var fontpng = new Texture(renderer); Gwen.Renderer.OpenTK.LoadTextureInternal( fontpng, GameResources.gamefont_15_png); var gamefont_15 = new Gwen.Renderer.BitmapFont( renderer, GameResources.gamefont_15_fnt, fontpng); var skin = new Gwen.Skin.TexturedBase(renderer, skinpng, GameResources.DefaultColors ) { DefaultFont = gamefont_15 }; Canvas = new GameCanvas(skin, this, renderer); _input = new Gwen.Input.OpenTK(this); _input.Initialize(Canvas); Canvas.ShouldDrawBackground = false; InitControls(); Models.LoadModels(); AddCursor("pencil", GameResources.cursor_pencil, 6, 25); AddCursor("line", GameResources.cursor_line, 11, 11); AddCursor("eraser", GameResources.cursor_eraser, 8, 8); AddCursor("hand", GameResources.cursor_move, 16, 16); AddCursor("closed_hand", GameResources.cursor_dragging, 16, 16); AddCursor("adjustline", GameResources.cursor_select, 4, 4); AddCursor("size_nesw", GameResources.cursor_size_nesw, 16, 16); AddCursor("size_nwse", GameResources.cursor_size_nwse, 16, 16); AddCursor("size_hor", GameResources.cursor_size_horz, 16, 16); AddCursor("size_ver", GameResources.cursor_size_vert, 16, 16); AddCursor("size_all", GameResources.cursor_size_all, 16, 16); AddCursor("default", GameResources.cursor_default, 7, 4); AddCursor("zoom", GameResources.cursor_zoom_in, 11, 10); Gwen.Platform.Neutral.CursorSetter = new UI.CursorImpl(this); Program.UpdateCheck(); Track.AutoLoadPrevious(); }
//Load content public void Load(ContentManager content, GraphicsDevice graphicsDevice) { _renderer = new Renderer.Renderer(); _logic = new MainLogic(); _editorLogic = new EditorLogic(); _assets = new Assets(); _debug = new DebugScreen(); _uiLogic = new UILogic(); Shaders.Load(content); _assets.Load(content, graphicsDevice); _renderer.Load(content); _logic.Load(content); _debug.LoadContent(content); _uiLogic.Load(content); }
//Load content public void Load(ContentManager content, GraphicsDevice graphicsDevice) { _renderer = new Renderer.Renderer(); _sceneLogic = new MainSceneLogic(); _guiLogic = new GUILogic(); _editorLogic = new EditorLogic(); _assets = new Assets(); _debug = new DebugScreen(); _guiRenderer = new GUIRenderer(); Globals.content = content; Shaders.Load(content); _assets.Load(content, graphicsDevice); _renderer.Load(content); _sceneLogic.Load(content); _debug.LoadContent(content); _guiRenderer.Load(content); }
public override void Start() { GL.ClearColor(0.0f, 0.0f, 0.4f, 0.0f); // An array of 3 vectors which represents 3 vertices var vertexBufferData = new[] { -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, }; // Generate 1 buffer, put the resulting identifier in vertexbuffer GL.GenBuffers(1, out vertexBuffer); // The following commands will talk about our 'vertexbuffer' buffer GL.BindBuffer(BufferTarget.ArrayBuffer, vertexBuffer); // Give our vertices to OpenGL. GL.BufferData(BufferTarget.ArrayBuffer, sizeof(float) * vertexBufferData.Length, vertexBufferData, BufferUsageHint.StaticDraw); programId = Shaders.Load( "2-Triangle/SimpleVertexShader.glsl", "2-Triangle/SimpleFragmentShader.glsl"); }
private void Load() { Log.Info("Starting asset loading thread"); SaveManager.Load(gameArea, SaveType.Global); checkFullscreen = true; progress++; var t = DateTime.Now.Millisecond; var c = DateTime.Now.Millisecond; Assets.Load(ref progress); Log.Info($"Assets took {(DateTime.Now.Millisecond - c) / 1000f} seconds"); c = DateTime.Now.Millisecond; Dialogs.Load(); progress++; CommonAse.Load(); progress++; ImGuiHelper.BindTextures(); progress++; Shaders.Load(); progress++; Prefabs.Load(); progress++; Items.Load(); progress++; LootTables.Load(); progress++; Mods.Load(); progress++; // Should be 13 here Log.Info($"Custom assets took {(DateTime.Now.Millisecond - c) / 1000f} seconds"); Log.Info("Done loading assets! Loading level now."); Lights.Init(); Physics.Init(); gameArea = new Area(); Run.Level = null; Tilesets.Load(); progress++; Achievements.Load(); c = DateTime.Now.Millisecond; if (!LoadEditor) { SaveManager.Load(gameArea, SaveType.Game); progress++; Log.Info($"Game took {(DateTime.Now.Millisecond - c) / 1000f} seconds"); c = DateTime.Now.Millisecond; Rnd.Seed = $"{Run.Seed}_{Run.Depth}"; SaveManager.Load(gameArea, SaveType.Level); progress++; Log.Info($"Level took {(DateTime.Now.Millisecond - c) / 1000f} seconds"); c = DateTime.Now.Millisecond; if (Run.Depth > 0) { SaveManager.Load(gameArea, SaveType.Player); } else { SaveManager.Generate(gameArea, SaveType.Player); } Log.Info($"Player took {(DateTime.Now.Millisecond - c) / 1000f}"); } progress++; // Should be 18 here Log.Info($"Done loading level! ({(DateTime.Now.Millisecond - t) / 1000f} seconds) Going to menu."); Engine.AssetsLoaded?.Invoke(); ready = true; }
protected override void OnLoad(EventArgs e) { Shaders.Load(); MSAABuffer = new MsaaFbo(); var renderer = new Gwen.Renderer.OpenTK(); var skinpng = renderer.CreateTexture(GameResources.DefaultSkin); var fontpng = renderer.CreateTexture(GameResources.liberation_sans_15_png); var fontpngbold = renderer.CreateTexture(GameResources.liberation_sans_15_bold_png); var gamefont_15 = new Gwen.Renderer.BitmapFont( renderer, GameResources.liberation_sans_15_fnt, fontpng); var gamefont_15_bold = new Gwen.Renderer.BitmapFont( renderer, GameResources.liberation_sans_15_bold_fnt, fontpngbold); var skin = new Gwen.Skin.TexturedBase(renderer, skinpng, GameResources.DefaultColors ) { DefaultFont = gamefont_15 }; Fonts f = new Fonts(gamefont_15, gamefont_15_bold); Canvas = new GameCanvas(skin, this, renderer, f); _input = new Gwen.Input.OpenTK(this); _input.Initialize(Canvas); Canvas.ShouldDrawBackground = false; Models.LoadModels(); AddCursor("pencil", GameResources.cursor_pencil, 6, 25); AddCursor("line", GameResources.cursor_line, 11, 11); AddCursor("eraser", GameResources.cursor_eraser, 8, 8); AddCursor("hand", GameResources.cursor_move, 16, 16); AddCursor("hand_point", GameResources.cursor_hand, 14, 8); AddCursor("closed_hand", GameResources.cursor_dragging, 16, 16); AddCursor("adjustline", GameResources.cursor_select, 4, 4); AddCursor("size_nesw", GameResources.cursor_size_nesw, 16, 16); AddCursor("size_nwse", GameResources.cursor_size_nwse, 16, 16); AddCursor("size_hor", GameResources.cursor_size_horz, 16, 16); AddCursor("size_ver", GameResources.cursor_size_vert, 16, 16); AddCursor("size_all", GameResources.cursor_size_all, 16, 16); AddCursor("default", GameResources.cursor_default, 7, 4); AddCursor("zoom", GameResources.cursor_zoom_in, 11, 10); AddCursor("ibeam", GameResources.cursor_ibeam, 11, 11); Program.UpdateCheck(); Track.AutoLoadPrevious(); linerider.Tools.CurrentTools.Init(); }