mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-02 11:54:33 +00:00
ShaderProgram - Add 'SetUniform2' overload for System.Drawing.Size
This commit is contained in:
@@ -65,6 +65,8 @@ namespace PckStudio.Rendering.Shader
|
||||
GL.Uniform1(location, value);
|
||||
}
|
||||
|
||||
public void SetUniform2(string name, Size value) => SetUniform2(name, new Vector2(value.Width, value.Height));
|
||||
|
||||
public void SetUniform2(string name, Vector2 value)
|
||||
{
|
||||
int location = GetUniformLocation(name);
|
||||
|
||||
@@ -26,7 +26,6 @@ using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Forms.Editor;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -873,7 +872,7 @@ namespace PckStudio.Rendering
|
||||
ShaderProgram cubeShader = GetShader("CubeShader");
|
||||
cubeShader.Bind();
|
||||
cubeShader.SetUniformMat4("u_ViewProjection", ref viewProjection);
|
||||
cubeShader.SetUniform2("u_TexSize", new Vector2(TextureSize.Width, TextureSize.Height));
|
||||
cubeShader.SetUniform2("u_TexSize", TextureSize);
|
||||
|
||||
skinTexture.Bind();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user