Added IndexSize to IndexFormat

This commit is contained in:
Simon Lübeß
2021-01-06 19:21:57 +01:00
parent bfb6bc57f4
commit 4a5a90c859
+7 -2
View File
@@ -2,8 +2,13 @@ namespace GlitchyEngine.Renderer
{ {
public enum IndexFormat public enum IndexFormat
{ {
Index16Bit, case Index16Bit;
Index32Bit, case Index32Bit;
/**
* Returns the size in bytes of an index of the IndexFormat.
*/
public int IndexSize => this == Index16Bit ? 2 : 4
} }
public class IndexBuffer : Buffer public class IndexBuffer : Buffer