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"); }
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(); } }
public void BindIntVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, uint offset) { }
public void BindFloatVertexAttribute(uint vbo, uint location, int size, GLVertexAttributeType pointerType, bool isNormalized, uint offset) { }
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)); }