mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 12:33:12 +00:00
More improvements. Add option to fill image with color.
This commit is contained in:
parent
b1140e0349
commit
b4fde67c82
22 changed files with 389 additions and 70 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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)
|
||||
|
|
|
@ -18,6 +18,8 @@ namespace FirstPlugin.Forms
|
|||
public SamplerEditorSimple()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetEditorOrientation(true);
|
||||
DisplayVertical();
|
||||
}
|
||||
|
||||
public void LoadTexture(MatTexture texture)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
128
Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.Designer.cs
generated
Normal file
128
Switch_Toolbox_Library/Forms/Editors/ImageEditor/ImageFillColor.Designer.cs
generated
Normal file
|
@ -0,0 +1,128 @@
|
|||
namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
partial class ImageFillColor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<byte[]> GenerateMipMaps(Bitmap bitmap)
|
||||
{
|
||||
List<byte[]> datas = new List<byte[]>();
|
||||
|
|
|
@ -342,6 +342,12 @@
|
|||
<Compile Include="Forms\Editors\HexEditor\SearchHex.Designer.cs">
|
||||
<DependentUpon>SearchHex.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editors\ImageEditor\ImageFillColor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editors\ImageEditor\ImageFillColor.Designer.cs">
|
||||
<DependentUpon>ImageFillColor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Editors\ImageEditor\ImageProgramSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -485,15 +491,6 @@
|
|||
<Compile Include="Forms\ViewportDivider.Designer.cs">
|
||||
<DependentUpon>ViewportDivider.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Wpf\STTimeLineControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Wpf\STTimeLineControl.Designer.cs">
|
||||
<DependentUpon>STTimeLineControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Wpf\WpfTimeline.xaml.cs">
|
||||
<DependentUpon>WpfTimeline.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Generics\GenericBitmapTexture.cs" />
|
||||
<Compile Include="Generics\GenericMaterial.cs" />
|
||||
<Compile Include="Generics\GenericMatTexture.cs" />
|
||||
|
@ -718,6 +715,9 @@
|
|||
<EmbeddedResource Include="Forms\Editors\HexEditor\SearchHex.resx">
|
||||
<DependentUpon>SearchHex.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Editors\ImageEditor\ImageFillColor.resx">
|
||||
<DependentUpon>ImageFillColor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Editors\ImageEditor\ImageProgramSettings.resx">
|
||||
<DependentUpon>ImageProgramSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -796,9 +796,6 @@
|
|||
<EmbeddedResource Include="Forms\ViewportDivider.resx">
|
||||
<DependentUpon>ViewportDivider.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Wpf\STTimeLineControl.resx">
|
||||
<DependentUpon>STTimeLineControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Custom\ListViewCustom.resx">
|
||||
<DependentUpon>ListViewCustom.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -932,12 +929,6 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\Save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Forms\Wpf\WpfTimeline.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\brsf.dds" />
|
||||
</ItemGroup>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue