U3D
Open-source, cross-platform 2D and 3D game engine built in C++
Loading...
Searching...
No Matches
Urho3D::ShaderParameter Struct Reference

Shader parameter definition. More...

#include </var/dev/u3d/stable/Source/Urho3D/Graphics/ShaderVariation.h>

Collaboration diagram for Urho3D::ShaderParameter:
[legend]

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.
 
ConstantBufferbufferPtr_ {}
 Constant buffer pointer. Defined only in shader programs.
 

Detailed Description

Shader parameter definition.


The documentation for this struct was generated from the following files: