コード例 #1
0
ファイル: VertexArrayObject.cs プロジェクト: Rainboi64/Fluint
        private static VertexAttribPointerType GetVertexPointerType(VertexLayoutAttributeType type)
        {
            return(type switch
            {
                VertexLayoutAttributeType.Byte => VertexAttribPointerType.Byte,
                VertexLayoutAttributeType.Int => VertexAttribPointerType.Int,
                VertexLayoutAttributeType.Short => VertexAttribPointerType.Short,
                VertexLayoutAttributeType.Float => VertexAttribPointerType.Float,
                VertexLayoutAttributeType.Double => VertexAttribPointerType.Double,

                VertexLayoutAttributeType.UnsignedByte => VertexAttribPointerType.UnsignedByte,
                VertexLayoutAttributeType.UnsignedInt => VertexAttribPointerType.UnsignedInt,
                VertexLayoutAttributeType.UnsignedShort => VertexAttribPointerType.UnsignedShort,

                _ => throw new NotImplementedException($"Unsupported AttributeType: {type}."),
            });
コード例 #2
0
ファイル: VertexArrayObject.cs プロジェクト: Rainboi64/Fluint
 private void Add(string name, VertexLayoutAttributeType type, int components)
 {
     _attributes.Add(new VertexLayoutAttribute(name, type, components));
 }
コード例 #3
0
 public VertexLayoutAttribute(string name, VertexLayoutAttributeType attributeType, int componentsCount)
 {
     Name            = name;
     AttributeType   = attributeType;
     ComponentsCount = componentsCount;
 }