Define Structs and Namespaces
slimReShade FX supports standard HLSL-style structs and namespaces to organize data and prevent name collisions.
Structs
Used to define custom data types.
struct MyStruct {
int MyField1;
float MyField3;
};Namespaces
Used to group functions and variables. Use the :: operator to resolve members.
namespace MyNamespace {
namespace MyNested {
void DoSomething() {}
}
void DoSomething() {
MyNested::DoSomething();
}
}struct MyStruct
{
int MyField1, MyField2;
float MyField3;
};
namespace MyNamespace
{
namespace MyNestedNamespace
{
void DoNothing()
{
}
}
void DoNothing()
{
MyNestedNamespace::DoNothing();
}
}