mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-18 00:58:06 +00:00
31 lines
811 B
C#
31 lines
811 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using OpenTK;
|
|
|
|
namespace PckStudio.Rendering
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 20)]
|
|
internal struct TextureVertex : IVertexLayout
|
|
{
|
|
internal Vector3 Position { get; set; }
|
|
internal Vector2 TexPosition { get; set; }
|
|
|
|
public TextureVertex(Vector3 position, Vector2 texPosition)
|
|
{
|
|
Position = position;
|
|
TexPosition = texPosition;
|
|
}
|
|
|
|
public VertexBufferLayout GetLayout()
|
|
{
|
|
var layout = new VertexBufferLayout();
|
|
layout.Add(ShaderDataType.Float3);
|
|
layout.Add(ShaderDataType.Float2);
|
|
return layout;
|
|
}
|
|
}
|
|
}
|