U3D
Open-source, cross-platform 2D and 3D game engine built in C++
|
Shader parameter definition. More...
#include </var/dev/u3d/stable/Source/Urho3D/Graphics/ShaderVariation.h>
Public Member Functions | |
ShaderParameter ()=default | |
Construct with defaults. | |
ShaderParameter (const String &name, unsigned glType, int location) | |
Construct with name, glType and location, leaving the remaining attributes zero-initialized (used only in OpenGL). | |
ShaderParameter (ShaderType type, const String &name, unsigned offset, unsigned size, unsigned buffer) | |
Construct with type, name, offset, size, and buffer, leaving the remaining attributes zero-initialized (used only in Direct3D11). | |
ShaderParameter (ShaderType type, const String &name, unsigned reg, unsigned regCount) | |
Construct with type, name, register, and register count, leaving the remaining attributes zero-initialized (used only in Direct3D9). | |
Public Attributes | |
ShaderType | type_ {} |
Shader type. | |
String | name_ {} |
Name of the parameter. | |
union { | |
unsigned offset_ | |
Offset in constant buffer. | |
int location_ | |
OpenGL uniform location. | |
unsigned register_ | |
Direct3D9 register index. | |
}; | |
union { | |
unsigned size_ | |
Parameter size. Used only on Direct3D11 to calculate constant buffer size. | |
unsigned glType_ | |
Parameter OpenGL type. | |
unsigned regCount_ | |
Number of registers on Direct3D9. | |
}; | |
unsigned | buffer_ {} |
Constant buffer index. Only used on Direct3D11. | |
ConstantBuffer * | bufferPtr_ {} |
Constant buffer pointer. Defined only in shader programs. | |
Shader parameter definition.