Files
XCEngine/docs/api/resources/shader/addattribute.md

489 B

Shader::AddAttribute

void AddAttribute(const ShaderAttribute& attribute)

添加顶点属性描述。

参数:

  • attribute - 属性描述结构体

返回:

线程安全: 非线程安全

复杂度: Amortized O(1)

示例:

ShaderAttribute attr;
attr.name = "position";
attr.location = 0;
attr.size = sizeof(float) * 3;
attr.type = 0;
vs->AddAttribute(attr);

相关文档