Exemple #1
0
        public void BindFloatVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, bool isNormalized, uint offset)
        {
            GL.Ext.EnableVertexArrayAttrib(vbo, location);
            mErrHandler.LogGLError(nameof(BindFloatVertexAttribute) + ".EnableVertexArrayAttrib");

            GL.VertexArrayAttribFormat(vbo, location, size, GetVertexAttribType(pointerType), isNormalized, offset);
            mErrHandler.LogGLError(nameof(BindFloatVertexAttribute) + ".VertexArrayAttribFormat");
        }
Exemple #2
0
        static VertexAttribType GetVertexAttribType(GLVertexAttributeType pointerType)
        {
            switch (pointerType)
            {
            case GLVertexAttributeType.Byte:
                return(VertexAttribType.Byte);

            case GLVertexAttributeType.UnsignedByte:
                return(VertexAttribType.UnsignedByte);

            case GLVertexAttributeType.Double:
                return(VertexAttribType.Double);


            case GLVertexAttributeType.Float:
                return(VertexAttribType.Float);

            case GLVertexAttributeType.HalfFloat:
                return(VertexAttribType.HalfFloat);

            case GLVertexAttributeType.Int:
                return(VertexAttribType.Int);

            case GLVertexAttributeType.UnsignedInt:
                return(VertexAttribType.UnsignedInt);

            case GLVertexAttributeType.Int2101010Rev:
                return(VertexAttribType.Int2101010Rev);

            case GLVertexAttributeType.UnsignedInt2101010Rev:
                return(VertexAttribType.UnsignedInt2101010Rev);

            case GLVertexAttributeType.Short:
                return(VertexAttribType.Short);

            case GLVertexAttributeType.UnsignedShort:
                return(VertexAttribType.UnsignedShort);

            default:
                throw new NotSupportedException();
            }
        }
Exemple #3
0
 public void BindIntVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, uint offset)
 {
 }
Exemple #4
0
 public void BindFloatVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, bool isNormalized, uint offset)
 {
 }
Exemple #5
0
 public void BindIntVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, uint offset)
 {
     GL.Ext.EnableVertexArrayAttrib(vbo, location);
     GL.VertexArrayAttribIFormat(vbo, location, size, GetVertexAttribType(pointerType), offset);
     mErrHandler.LogGLError(nameof(BindIntVertexAttribute));
 }