Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

RDVertexAttribute

继承: RefCounted < Object

顶点属性(由 RenderingDevice 使用)。

描述

这个对象由 RenderingDevice 使用。

属性

DataFormat

format

232

VertexFrequency

frequency

0

int

location

0

int

offset

0

int

stride

0


属性说明

DataFormat format = 232 🔗

将属性数据发送至着色器时,对该数据的解释方式。


VertexFrequency frequency = 0 🔗

从顶点缓冲中拉取该属性的频率。


int location = 0 🔗

  • void set_location(value: int)

  • int get_location()

该属性在着色器中绑定的位置。


int offset = 0 🔗

  • void set_offset(value: int)

  • int get_offset()

顶点缓冲起点与该属性的第一个实例之间的字节数。


int stride = 0 🔗

  • void set_stride(value: int)

  • int get_stride()

该属性相邻两个实例之间的字节数。