目录

VertexAttribute

Struct Info

struct VertexAttribute

顶点属性。

Public Constructor Summary

Constructor Name

VertexAttribute()

默认的构造函数。

VertexAttribute(const String& name, u32 location, u32 binding, PixelFormat format, u32 offset = 0)

将每个字段的值初始化为参数中的值。

Public Field Summary

Qualifier and Type

Field and Description

String

name

顶点属性的名称。

u32

location

对应shader中的location。

u32

binding

对应shader中的binding。

PixelFormat

format

当前顶点属性的像素组织形式 。具体参见PixelFormat。

u32

offset

当前顶点属性在顶点数据缓存中的偏移。

Public Function Summary

Qualifier and Type

Function Name and Description

bool

operator==(const VertexAttribute& other) const

重写==操作。

bool

operation!=(const VertexAttribute& other) const

重写!=操作。

Public Constructors

[h2]VertexAttribute()

Constructor

VertexAttribute()

构造函数。

[h2]VertexAttribute(const String& name, u32 location, u32 binding, PixelFormat format, u32 offset = 0)

Constructor

VertexAttribute(const String& name, u32 location, u32 binding, PixelFormat format, u32 offset = 0)

构造函数。

Parameters

Name

Description

name

顶点属性的名称。

location

与shader文件中的location对应。

binding

与shader文件中的binding对应。

format

像素格式,具体参见PixelFormat 。

offset

在顶点缓存中的偏移,默认值为0。

Public Functions

[h2]operator==

Function

bool operator==(const VertexAttribute& other) const

重写==操作。

Parameters

name

Description

other

要比较的顶点属性列表。具体参见VertexAttribute。

Returns

Type

Description

bool

当前顶点属性与参数中的顶点属性是否相同。

  • true:相同。
  • false:不相同。

[h2]operation!=

Function

operator!=(const VertexAttribute& other) const

重写!=操作。

Parameters

Name

Description

other

要比较的顶点属性列表。

Returns

Type

Description

bool

当前顶点属性与参数中的顶点属性是否相同。

  • true:相同。
  • false:不相同。