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) { screenTriangle = ScreenDrawing.CreateScreenTriangle(); } }
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 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); 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); // Ignore the material values. forgeMesh.ResetRenderSettings(); } } }
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(); if (OpenTkSharedResources.SetupStatus == OpenTkSharedResources.SharedResourceStatus.Initialized) { // Only happens once. UpdateMaterialThumbnails(); } }
private void charDifColorGLControl_Load(object sender, EventArgs e) { OpenTkSharedResources.InitializeSharedResources(); }