private void Form4_Load(object sender, EventArgs e) { LoadObjectList(); LoadRecentList(); foreach (string item in RecentFiles) { ToolStripMenuItem fileRecent = new ToolStripMenuItem(); fileRecent.Click += RecentFile_click; fileRecent.Text = item; fileRecent.Size = new System.Drawing.Size(170, 40); fileRecent.AutoSize = true; fileRecent.Image = null; fileRecent.ForeColor = Color.White; recentToolStripMenuItem.DropDownItems.Add(fileRecent); //add the menu to "recent" menu } LibraryGUI.Instance.dockPanel = dockPanel1; if (OpenTK.Graphics.GraphicsContext.CurrentContext != null) { OpenTKSharedResources.InitializeSharedResources(); } if (Runtime.OpenStartupWindow) { Startup_Window window = new Startup_Window(); window.TopMost = true; window.Show(); } }
public BNTXEditor() { InitializeComponent(); FilePath = ""; Text = "New Binary Texture"; fw = new FileSystemWatcher(); fw.Path = Path.GetTempPath(); fw.NotifyFilter = NotifyFilters.Size | NotifyFilters.LastAccess | NotifyFilters.LastWrite; fw.EnableRaisingEvents = false; fw.Changed += new FileSystemEventHandler(OnChanged); fw.Filter = ""; MenuItem export = new MenuItem("Export"); export.Click += exportTextureToolStripMenuItem_Click; TextureMenu.MenuItems.Add(export); MenuItem replace = new MenuItem("Replace"); replace.Click += replaceTextureToolStripMenuItem_Click; TextureMenu.MenuItems.Add(replace); OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { screenVao = ScreenDrawing.CreateScreenTriangleVao(); } }
private void Form1_Load(object sender, EventArgs e) { bool HasVersionFile = true; VersionCheck version = new VersionCheck(HasVersionFile); if (HasVersionFile) { Runtime.ProgramVersion = version.ProgramVersion; Runtime.CommitInfo = version.CommitInfo; Runtime.CompileDate = version.CompileDate; } else { version.SaveVersionInfo(); } ThreadStart t = new ThreadStart(UpdateProgram.CheckLatest); Thread thread = new Thread(t); thread.Start(); Application.Idle += Application_Idle; if (Runtime.UseOpenGL) { ShaderTools.executableDir = Runtime.ExecutableDir; OpenTKSharedResources.InitializeSharedResources(); Runtime.OpenTKInitialized = true; Runtime.renderer = GL.GetString(StringName.Renderer); Runtime.openGLVersion = GL.GetString(StringName.Version); Runtime.GLSLVersion = GL.GetString(StringName.ShadingLanguageVersion); ParseGLVersion(); } LoadPLugins(); UpdateToolbar(HasVersionFile); Reload(); LoadMDITheme(); LoadRecentList(); LoadPluginFileContextMenus(); foreach (string file in openedFiles) { if (File.Exists(file)) { OpenFile(file); } } openedFiles.Clear(); if (Runtime.UseDebugDomainExceptionHandler) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); } }
private void SetUpRendering() { // Make sure the shaders and textures are ready for rendering. OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { BNTX.RefreshGlTexturesByName(); } }
private void SetUpRendering() { // Make sure the shaders and textures are ready for rendering. OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { currentNut.RefreshGlTexturesByHashId(); pngExportFramebuffer = new Framebuffer(FramebufferTarget.Framebuffer, glControl1.Width, glControl1.Height); } }
private void glControl1_Load(object sender, System.EventArgs e) { OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { nut.RefreshGlTexturesByHashId(); pngExportFramebuffer = new Framebuffer(FramebufferTarget.Framebuffer, glControl1.Width, glControl1.Height); screenTriangle = ScreenDrawing.CreateScreenTriangle(); } }
private void glControl1_Load(object sender, EventArgs e) { OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { if (sourceNud != null) { NudUvRendering.InitializeUVBufferData(sourceNud); } } }
private void SetUpRendering() { // Make sure the shaders and textures are ready for rendering. OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { BNTX.RefreshGlTexturesByName(); pngExportFramebuffer = new Framebuffer(FramebufferTarget.Framebuffer, glControl1.Width, glControl1.Height); screenTriangle = ScreenDrawing.CreateScreenTriangle(); } }
private void glControl1_Load(object sender, EventArgs e) { OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { if (sourceNud != null) { glControl1.MakeCurrent(); forgeMesh = sourceNud.CreateRenderMesh(polygonToRender); } } }
public NUDMaterialEditor(NUD.Polygon p) : this() { currentPolygon = p; currentMaterialList = p.materials; Init(); FillForm(); ResizeGlControlsToMaxSquareSize(glControlTableLayout); matsComboBox.SelectedIndex = 0; texturesListView.LargeImageList = textureThumbnails; RefreshTexturesImageList(); // The dummy textures will be used later. OpenTKSharedResources.InitializeSharedResources(); // Only happens once. UpdateMaterialThumbnails(); }
private void Form4_Load(object sender, EventArgs e) { VersionCheck version = new VersionCheck(); Runtime.ProgramVersion = version.ProgramVersion; Runtime.CommitInfo = version.CommitInfo; Runtime.CompileDate = version.CompileDate; UpdateToolbar(); LoadObjectList(); LoadRecentList(); foreach (string item in RecentFiles) { ToolStripMenuItem fileRecent = new ToolStripMenuItem(); fileRecent.Click += RecentFile_click; fileRecent.Text = item; fileRecent.Size = new System.Drawing.Size(170, 40); fileRecent.AutoSize = true; fileRecent.Image = null; fileRecent.ForeColor = Color.White; recentToolStripMenuItem.DropDownItems.Add(fileRecent); //add the menu to "recent" menu } ThreadStart t = new ThreadStart(UpdateProgram.CheckLatest); Thread thread = new Thread(t); thread.Start(); Application.Idle += Application_Idle; LibraryGUI.Instance.dockPanel = dockPanel1; if (OpenTK.Graphics.GraphicsContext.CurrentContext != null) { OpenTKSharedResources.InitializeSharedResources(); } if (Runtime.OpenStartupWindow && !UpdateProgram.CanUpdate) { Startup_Window window = new Startup_Window(); window.TopMost = true; window.Show(); } }
private void charDifColorGLControl_Load(object sender, EventArgs e) { OpenTKSharedResources.InitializeSharedResources(); }
private void Form1_Load(object sender, EventArgs e) { Runtime.MainForm = this; compressionToolStripMenuItem.DropDownItems.AddRange(CompressionMenus.GetMenuItems().ToArray()); //Redo setting this since designer keeps resetting this tabForms.myBackColor = FormThemes.BaseTheme.FormBackColor; OnMdiWindowClosed(); ResetMenus(); bool HasVersionFile = true; VersionCheck version = new VersionCheck(HasVersionFile); if (HasVersionFile) { Runtime.ProgramVersion = version.ProgramVersion; Runtime.CommitInfo = version.CommitInfo; Runtime.CompileDate = version.CompileDate; } else { version.SaveVersionInfo(); } ThreadStart t = new ThreadStart(UpdateProgram.CheckLatest); Thread thread = new Thread(t); thread.Start(); Application.Idle += Application_Idle; if (Runtime.UseOpenGL) { ShaderTools.executableDir = Runtime.ExecutableDir; OpenTKSharedResources.InitializeSharedResources(); if (OpenTKSharedResources.SetupStatus == OpenTKSharedResources.SharedResourceStatus.Initialized) { Runtime.OpenTKInitialized = true; Runtime.renderer = GL.GetString(StringName.Renderer); Runtime.openGLVersion = GL.GetString(StringName.Version); Runtime.GLSLVersion = GL.GetString(StringName.ShadingLanguageVersion); ParseGLVersion(); } } LoadPLugins(); UpdateToolbar(HasVersionFile); LoadMDITheme(); LoadRecentList(); ReloadFiles(); LoadPluginFileContextMenus(); WindowsExplorer.ExplorerContextMenu.LoadMenus(); foreach (string file in OpenedFiles) { if (File.Exists(file)) { OpenFile(file); } } OpenedFiles.Clear(); if (Runtime.UseDebugDomainExceptionHandler) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); } }