PushConstant

PushConstant class

A utility to provide data to shader through push constant.

Methods

constructor

NameDescription
constructor()Constructor of the PushConstant

Result:


write

NameDescription
write(mat)Write the matrix to the constant

Parameters:

NameTypeDescription
matFMatrix4The matrix to write

Result:


write

NameDescription
write(n)Write a int value to the constant

Parameters:

NameTypeDescription
Numbernull

Result:


write

NameDescription
write(f)Write a float value to the constant

Parameters:

NameTypeDescription
Numbernull

Result:


write

NameDescription
write(vec)Write a 4-component vector to the constant

Parameters:

NameTypeDescription
veFVector4null

Result:


write

NameDescription
write(vec)Write a 3-component vector to the constant

Parameters:

NameTypeDescription
veFVector3null

Result:


write

NameDescription
write(x, y, z, w)Write a 4-component vector to the constant

Parameters:

NameTypeDescription
Numbernull
Numbernull
Numbernull
Numbernull

Result:


commit

NameDescription
commit(stage, commandList)Commit prepared data to graphics pipeline.

Parameters:

NameTypeDescription
stageNumberShaderStage
commandLisICommandListnull

Result: