diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 87bbd575..9c850280 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 97c86197..8161f208 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index e9b2388c..639230db 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/GL/BCRES_Render.cs b/Switch_FileFormatsMain/GL/BCRES_Render.cs index ec2eb5b0..fa7d5044 100644 --- a/Switch_FileFormatsMain/GL/BCRES_Render.cs +++ b/Switch_FileFormatsMain/GL/BCRES_Render.cs @@ -189,18 +189,21 @@ namespace FirstPlugin private void SetUniformBlocks(MTOBWrapper mat, ShaderProgram shader, SOBJWrapper m, int id) { - int UniformBlock = GL.GetUniformBlockIndex(shader.program, "TexCoord1"); - GL.UniformBlockBinding(shader.program, UniformBlock, 0); + shader.UniformBlockBinding("TexCoord1", 3); + GL.GetActiveUniformBlock(shader.program, + shader.GetUniformBlockIndex("TexCoord1"), + ActiveUniformBlockParameter.UniformBlockBinding, out int binding); - - GL.BindBuffer(BufferTarget.UniformBuffer, TexCoord1Buffer); - GL.BufferData(BufferTarget.UniformBuffer, - (IntPtr)MTOBWrapper.TexCoord1.Size, - ref mat.TexCoord1Buffer, - BufferUsageHint.StaticDraw); - GL.BindBuffer(BufferTarget.UniformBuffer, 0); - GL.BindBufferRange(BufferRangeTarget.UniformBuffer, 0, TexCoord1Buffer, (IntPtr)0, - MTOBWrapper.TexCoord1.Size); + /* GL.BindBuffer(BufferTarget.UniformBuffer, TexCoord1Buffer); + GL.BufferData(BufferTarget.UniformBuffer, + (IntPtr)MTOBWrapper.TexCoord1.Size, + ref mat.TexCoord1Buffer, + BufferUsageHint.StaticDraw); + GL.BindBuffer(BufferTarget.UniformBuffer, 0); + GL.BindBufferRange(BufferRangeTarget.UniformBuffer, 0, TexCoord1Buffer, (IntPtr)0, + MTOBWrapper.TexCoord1.Size); + GL.BindBuffer(BufferTarget.UniformBuffer, TexCoord1Buffer); + GL.BINDBUFFER*/ } private static void SetUniforms(MTOBWrapper mat, ShaderProgram shader, SOBJWrapper m, int id) diff --git a/Switch_FileFormatsMain/GUI/BFRES/Texture Sampler/SamplerEditorSimple.cs b/Switch_FileFormatsMain/GUI/BFRES/Texture Sampler/SamplerEditorSimple.cs index 3948c5f3..b2a1e26c 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Texture Sampler/SamplerEditorSimple.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Texture Sampler/SamplerEditorSimple.cs @@ -18,6 +18,8 @@ namespace FirstPlugin.Forms public SamplerEditorSimple() { InitializeComponent(); + SetEditorOrientation(true); + DisplayVertical(); } public void LoadTexture(MatTexture texture) diff --git a/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll b/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll index b92b7ab3..6f8acd65 100644 Binary files a/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll and b/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index b10e1536..02a75c5a 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll b/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll index 61287dd7..0dfdb279 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll and b/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache index 987fe651..d171b549 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 19b0517d..87e35eb6 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/Forms/Editors/Animation/AnimationPanel.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/Animation/AnimationPanel.Designer.cs index c70240a6..52a08d81 100644 --- a/Switch_Toolbox_Library/Forms/Editors/Animation/AnimationPanel.Designer.cs +++ b/Switch_Toolbox_Library/Forms/Editors/Animation/AnimationPanel.Designer.cs @@ -76,7 +76,7 @@ this.loopChkBox.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.loopChkBox.Checked = true; this.loopChkBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.loopChkBox.Location = new System.Drawing.Point(318, 10); + this.loopChkBox.Location = new System.Drawing.Point(452, 8); this.loopChkBox.Name = "loopChkBox"; this.loopChkBox.Size = new System.Drawing.Size(50, 17); this.loopChkBox.TabIndex = 5; @@ -89,9 +89,9 @@ this.totalFrame.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.totalFrame.BorderStyle = System.Windows.Forms.BorderStyle.None; this.totalFrame.ForeColor = System.Drawing.Color.White; - this.totalFrame.Location = new System.Drawing.Point(508, 12); + this.totalFrame.Location = new System.Drawing.Point(571, 10); this.totalFrame.Name = "totalFrame"; - this.totalFrame.Size = new System.Drawing.Size(98, 16); + this.totalFrame.Size = new System.Drawing.Size(57, 16); this.totalFrame.TabIndex = 4; // // currentFrameUpDown @@ -100,9 +100,9 @@ this.currentFrameUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.currentFrameUpDown.BorderStyle = System.Windows.Forms.BorderStyle.None; this.currentFrameUpDown.ForeColor = System.Drawing.Color.White; - this.currentFrameUpDown.Location = new System.Drawing.Point(390, 12); + this.currentFrameUpDown.Location = new System.Drawing.Point(508, 10); this.currentFrameUpDown.Name = "currentFrameUpDown"; - this.currentFrameUpDown.Size = new System.Drawing.Size(98, 16); + this.currentFrameUpDown.Size = new System.Drawing.Size(57, 16); this.currentFrameUpDown.TabIndex = 3; this.currentFrameUpDown.ValueChanged += new System.EventHandler(this.currentFrameUpDown_ValueChanged); // @@ -122,7 +122,7 @@ // // stPanel1 // - this.stPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.stPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.stPanel1.Location = new System.Drawing.Point(0, 0); this.stPanel1.Name = "stPanel1"; @@ -131,8 +131,8 @@ // // animationTrackBar // - this.animationTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.animationTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.animationTrackBar.CurrentFrame = 0; this.animationTrackBar.FrameCount = 1000; diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs index d68f0536..d79e1280 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.Designer.cs @@ -31,7 +31,6 @@ this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorBase)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.stPanel2 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPanel1 = new Switch_Toolbox.Library.Forms.STPanel(); this.stPanel4 = new Switch_Toolbox.Library.Forms.STPanel(); @@ -77,6 +76,8 @@ this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.brightnessContrastToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.fillColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); @@ -356,6 +357,7 @@ // editToolStripMenuItem // this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fillColorToolStripMenuItem, this.undoToolStripMenuItem, this.redoToolStripMenuItem, this.editInExternalProgramToolStripMenuItem, @@ -539,6 +541,13 @@ this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22); this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast"; // + // fillColorToolStripMenuItem + // + this.fillColorToolStripMenuItem.Name = "fillColorToolStripMenuItem"; + this.fillColorToolStripMenuItem.Size = new System.Drawing.Size(192, 22); + this.fillColorToolStripMenuItem.Text = "Fill Color"; + this.fillColorToolStripMenuItem.Click += new System.EventHandler(this.fillColorToolStripMenuItem_Click); + // // ImageEditorBase // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -611,5 +620,6 @@ private System.Windows.Forms.ToolStripMenuItem enableZoomToolStripMenuItem; private STPanel stPanel5; private STLabel bottomLabel; + private System.Windows.Forms.ToolStripMenuItem fillColorToolStripMenuItem; } } \ No newline at end of file diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs index 265d850d..8cee070e 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageEditorBase.cs @@ -909,6 +909,8 @@ namespace Switch_Toolbox.Library.Forms settings.LoadImage(ActiveTexture); if (settings.ShowDialog() == DialogResult.OK) { + UseDefaultEditor = !settings.OpenDefaultProgramSelection; + string UseExtension = settings.GetSelectedExtension(); FormatToChange = settings.GetSelectedImageFormat(); @@ -1197,5 +1199,27 @@ namespace Switch_Toolbox.Library.Forms bottomLabel.Text = $"Zoom: 100% Image {pictureBoxCustom1.Image.Width} x {pictureBoxCustom1.Image.Height}"; } } + + private void fillColorToolStripMenuItem_Click(object sender, EventArgs e) + { + Image Image = pictureBoxCustom1.Image; + if (Image == null) + return; + + ImageFillColor dialog = new ImageFillColor(); + if (dialog.ShowDialog() == DialogResult.OK) + { + if (dialog.ResizeSmall) + { + Width = 1; + Height = 1; + } + Bitmap newImage = BitmapExtension.FillColor(Width, Height, dialog.FillColor); + + HasBeenEdited = true; + UpdateEditCached(newImage); + ApplyEdit(newImage); + } + } } } diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.Designer.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.Designer.cs new file mode 100644 index 00000000..1d2378ef --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.Designer.cs @@ -0,0 +1,128 @@ +namespace Switch_Toolbox.Library.Forms +{ + partial class ImageFillColor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.stCheckBox1 = new Switch_Toolbox.Library.Forms.STCheckBox(); + this.stButton1 = new Switch_Toolbox.Library.Forms.STButton(); + this.stLabel1 = new Switch_Toolbox.Library.Forms.STLabel(); + this.stButton2 = new Switch_Toolbox.Library.Forms.STButton(); + this.stButton3 = new Switch_Toolbox.Library.Forms.STButton(); + this.contentContainer.SuspendLayout(); + this.SuspendLayout(); + // + // contentContainer + // + this.contentContainer.Controls.Add(this.stButton3); + this.contentContainer.Controls.Add(this.stButton2); + this.contentContainer.Controls.Add(this.stLabel1); + this.contentContainer.Controls.Add(this.stButton1); + this.contentContainer.Controls.Add(this.stCheckBox1); + this.contentContainer.Size = new System.Drawing.Size(135, 128); + this.contentContainer.Controls.SetChildIndex(this.stCheckBox1, 0); + this.contentContainer.Controls.SetChildIndex(this.stButton1, 0); + this.contentContainer.Controls.SetChildIndex(this.stLabel1, 0); + this.contentContainer.Controls.SetChildIndex(this.stButton2, 0); + this.contentContainer.Controls.SetChildIndex(this.stButton3, 0); + // + // stCheckBox1 + // + this.stCheckBox1.AutoSize = true; + this.stCheckBox1.Location = new System.Drawing.Point(9, 40); + this.stCheckBox1.Name = "stCheckBox1"; + this.stCheckBox1.Size = new System.Drawing.Size(90, 17); + this.stCheckBox1.TabIndex = 11; + this.stCheckBox1.Text = "Resize to 1x1"; + this.stCheckBox1.UseVisualStyleBackColor = true; + this.stCheckBox1.CheckedChanged += new System.EventHandler(this.stCheckBox1_CheckedChanged); + // + // stButton1 + // + this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.stButton1.Location = new System.Drawing.Point(46, 63); + this.stButton1.Name = "stButton1"; + this.stButton1.Size = new System.Drawing.Size(32, 23); + this.stButton1.TabIndex = 12; + this.stButton1.UseVisualStyleBackColor = false; + this.stButton1.Click += new System.EventHandler(this.stButton1_Click); + // + // stLabel1 + // + this.stLabel1.AutoSize = true; + this.stLabel1.Location = new System.Drawing.Point(9, 68); + this.stLabel1.Name = "stLabel1"; + this.stLabel1.Size = new System.Drawing.Size(31, 13); + this.stLabel1.TabIndex = 13; + this.stLabel1.Text = "Color"; + // + // stButton2 + // + this.stButton2.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.stButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.stButton2.Location = new System.Drawing.Point(79, 98); + this.stButton2.Name = "stButton2"; + this.stButton2.Size = new System.Drawing.Size(53, 23); + this.stButton2.TabIndex = 14; + this.stButton2.Text = "Cancel"; + this.stButton2.UseVisualStyleBackColor = false; + this.stButton2.Click += new System.EventHandler(this.stButton2_Click); + // + // stButton3 + // + this.stButton3.DialogResult = System.Windows.Forms.DialogResult.OK; + this.stButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.stButton3.Location = new System.Drawing.Point(23, 98); + this.stButton3.Name = "stButton3"; + this.stButton3.Size = new System.Drawing.Size(53, 23); + this.stButton3.TabIndex = 15; + this.stButton3.Text = "Ok"; + this.stButton3.UseVisualStyleBackColor = false; + this.stButton3.Click += new System.EventHandler(this.stButton3_Click); + // + // ImageFillColor + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(141, 133); + this.Name = "ImageFillColor"; + this.Text = "Fill Color"; + this.contentContainer.ResumeLayout(false); + this.contentContainer.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private STCheckBox stCheckBox1; + private STButton stButton1; + private STButton stButton3; + private STButton stButton2; + private STLabel stLabel1; + } +} \ No newline at end of file diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.cs new file mode 100644 index 00000000..646b337a --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Switch_Toolbox.Library.Forms +{ + public partial class ImageFillColor : STForm + { + public Color FillColor = Color.White; + public bool ResizeSmall = false; + + public ImageFillColor() + { + InitializeComponent(); + + CanResize = true; + + stCheckBox1.BackColor = FillColor; + } + + private void stButton1_Click(object sender, EventArgs e) + { + ColorDialog colorDialog = new ColorDialog(); + if (colorDialog.ShowDialog() == DialogResult.OK) { + FillColor = colorDialog.Color; + stCheckBox1.BackColor = FillColor; + } + } + + private void stCheckBox1_CheckedChanged(object sender, EventArgs e) { + ResizeSmall = stCheckBox1.Checked; + } + + private void stButton3_Click(object sender, EventArgs e) + { + + } + + private void stButton2_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.resx b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageProgramSettings.cs b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageProgramSettings.cs index 99c92e94..73a8186d 100644 --- a/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageProgramSettings.cs +++ b/Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageProgramSettings.cs @@ -13,6 +13,8 @@ namespace Switch_Toolbox.Library.Forms { public partial class ImageProgramSettings : STForm { + public bool OpenDefaultProgramSelection = false; + public ImageProgramSettings() { InitializeComponent(); @@ -65,19 +67,8 @@ namespace Switch_Toolbox.Library.Forms private void stButton2_Click(object sender, EventArgs e) { - string UseExtension = GetSelectedExtension(); - - string TemporaryName = Path.GetTempFileName(); - TemporaryName = Path.ChangeExtension(TemporaryName, UseExtension); - - ShowOpenWithDialog(TemporaryName); - } - - public static Process ShowOpenWithDialog(string path) - { - var args = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "shell32.dll"); - args += ",OpenAs_RunDLL " + path; - return Process.Start("rundll32.exe", args); + OpenDefaultProgramSelection = true; + DialogResult = DialogResult.OK; } } } diff --git a/Switch_Toolbox_Library/Imaging/BitmapExtension.cs b/Switch_Toolbox_Library/Imaging/BitmapExtension.cs index c91e77cf..38ca003d 100644 --- a/Switch_Toolbox_Library/Imaging/BitmapExtension.cs +++ b/Switch_Toolbox_Library/Imaging/BitmapExtension.cs @@ -17,6 +17,18 @@ namespace Switch_Toolbox.Library { } + + public static Bitmap FillColor(int Width, int Height, Color color) + { + Bitmap Bmp = new Bitmap(Width, Height); + using (Graphics gfx = Graphics.FromImage(Bmp)) + using (SolidBrush brush = new SolidBrush(color)) + { + gfx.FillRectangle(brush, 0, 0, Width, Height); + } + return Bmp; + } + public static List GenerateMipMaps(Bitmap bitmap) { List datas = new List(); diff --git a/Switch_Toolbox_Library/Switch_Toolbox_Library.csproj b/Switch_Toolbox_Library/Switch_Toolbox_Library.csproj index 77034687..520bec3f 100644 --- a/Switch_Toolbox_Library/Switch_Toolbox_Library.csproj +++ b/Switch_Toolbox_Library/Switch_Toolbox_Library.csproj @@ -342,6 +342,12 @@ SearchHex.cs + + Form + + + ImageFillColor.cs + Form @@ -485,15 +491,6 @@ ViewportDivider.cs - - UserControl - - - STTimeLineControl.cs - - - WpfTimeline.xaml - @@ -718,6 +715,9 @@ SearchHex.cs + + ImageFillColor.cs + ImageProgramSettings.cs @@ -796,9 +796,6 @@ ViewportDivider.cs - - STTimeLineControl.cs - ListViewCustom.cs @@ -932,12 +929,6 @@ - - - Designer - MSBuild:Compile - - diff --git a/Toolbox/Gl_EditorFramework.dll b/Toolbox/Gl_EditorFramework.dll index e1611522..de2747d7 100644 Binary files a/Toolbox/Gl_EditorFramework.dll and b/Toolbox/Gl_EditorFramework.dll differ diff --git a/Toolbox/Gl_EditorFramework.pdb b/Toolbox/Gl_EditorFramework.pdb index 7f065937..f67487ea 100644 Binary files a/Toolbox/Gl_EditorFramework.pdb and b/Toolbox/Gl_EditorFramework.pdb differ diff --git a/Toolbox/Shader/Bcres/BCRES.vert b/Toolbox/Shader/Bcres/BCRES.vert index 76a93fc0..70d77d04 100644 --- a/Toolbox/Shader/Bcres/BCRES.vert +++ b/Toolbox/Shader/Bcres/BCRES.vert @@ -43,27 +43,15 @@ uniform int NoSkinning; uniform int RigidSkinning; uniform int SingleBoneIndex; -struct TexCoord1 +vec2 ST0_Translate; +float ST0_Rotate; +vec2 ST0_Scale; + +uniform TexCoord1 { - vec2 Translate; - float Rotate; - vec2 Scale; + float values[10]; } texCoord1; -struct TexCoord2 -{ - vec2 Translate; - float Rotate; - vec2 Scale; -}; - -layout (std140) uniform TexCoord3 -{ - vec2 Translate; - float Rotate; - vec2 Scale; -}; - vec4 skin(vec3 pos, ivec4 index) { vec4 newPosition = vec4(pos.xyz, 1.0); @@ -141,7 +129,7 @@ void main() f_texcoord2 = vUV2; tangent = vTangent; - // f_texcoord0 = vec2((f_texcoord0 * texCoord1.Scale) + texCoord1.Translate); + // f_texcoord0 = vec2((f_texcoord0 * ST0_Scale) + ST0_Translate); gl_Position = mtxCam * mtxMdl * vec4(vPosition.xyz, 1.0);