Last active
December 7, 2018 02:38
-
-
Save baobao/ec77d5a3f8c0ab578e3356aba60c6257 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 座標と色情報を持つ頂点データ | |
struct VertexData | |
{ | |
public Vector3 position; | |
public Vector3 color; | |
// この頂点データの容量 | |
public static int SizeInBytes => System.Runtime.InteropServices.Marshal.SizeOf(typeof(VertexData)); | |
public static InputElement[] VertexInputElements = new[] | |
{ | |
new InputElement | |
{ | |
SemanticName = "SV_Position", | |
Format = Format.R32G32B32_Float | |
}, | |
new InputElement | |
{ | |
SemanticName = "COLOR", | |
Format = Format.R32G32B32_Float, | |
// アドレスの自動配置 | |
AlignedByteOffset = InputElement.AppendAligned | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment