FOptimusDataTypeRegistry

Choose your operating system:

Windows

macOS

Linux

References

Module

OptimusDeveloper

Header

/Engine/Plugins/Experimental/Optimus/Source/OptimusDeveloper/Public/OptimusDataTypeRegistry.h

Include

#include "OptimusDataTypeRegistry.h"

Syntax

class FOptimusDataTypeRegistry

Constructors

No constructors are accessible with public or protected access.

Destructors

Name Description

Public function

~FOptimusDataTypeRegistry()

Functions

Name Description

Protected function Const

PropertyCrea...

 

FindPropertyCreateFunc

(
    FName InTypeName
)

A helper function to return a property create function.

Protected function Const

PropertyValu...

 

FindPropertyValueConvertFunc

(
    FName InTypeName
)

A helper function to return a property create function.

Public function Const

FOptimusData...

 

FindType

(
    const FProperty& InProperty
)

Find the registered type associated with the given property's type.

Public function Const

FOptimusData...

 

FindType

(
    const FFieldClass& InFieldType
)

Find the registered type associated with the given field class.

Public function Const

FOptimusData...

 

FindType

(
    FName InTypeName
)

Find the registered type with the given name.

Public function Const

FOptimusData...

 

FindType

(
    FShaderValueTypeHandle InValueType
)

FIXME: We should allow for some kind of type hinting from the HLSL side (e.g. vector4 a color or a vector of four independent scalars).

Public function Static

FOptimusData...

 

Get()

Get the singleton registry object

Public function Const

TArray< FOpt...

 

GetAllTypes()

Returns all registered types

Protected function Static

void

 

RegisterBuiltinTypes()

Call during module init to register all known built-in types

Public function

bool

 

RegisterType

(
    UClass* InClassType,
    TOptional< FLinearColor > InPinColo...,
    EOptimusDataTypeUsageFlags InUsageF...
)

Register a complex type that has only has correspondence on the UE side.

Public function

bool

 

RegisterType

(
    UScriptStruct* InStructType,
    FShaderValueTypeHandle InShaderValu...,
    TOptional< FLinearColor > InPinColo...,
    bool bInShowElements,
    EOptimusDataTypeUsageFlags InUsageF...
)

Register a complex type that has corresponding types on both the UE and HLSL side.

Public function

bool

 

RegisterType

(
    FName InTypeName,
    const FText& InDisplayName,
    FShaderValueTypeHandle InShaderValu...,
    FName InPinCategory,
    UObject* InPinSubCategory,
    FLinearColor InPinColor,
    EOptimusDataTypeUsageFlags InUsageF...
)

Register a type that only has correspondence on the HLSL side.

Public function

bool

 

RegisterType

(
    const FFieldClass& InFieldType,
    const FText& InDisplayName,
    FShaderValueTypeHandle InShaderValu...,
    PropertyCreateFuncT InPropertyCreat...,
    PropertyValueConvertFuncT InPropert...,
    FName InPinCategory,
    TOptional< FLinearColor > InPinColo...,
    EOptimusDataTypeUsageFlags InUsageF...
)

Register a POD type that has corresponding types on both the UE and HLSL side.

Protected function Static

void

 

UnregisterAllTypes()

Call during module shutdown to release memory

Typedefs

Name

Description

PropertyCreateFuncT

PropertyValueConvertFuncT

Defines a pointer to a function that takes a const uint8 pointer that points to the property value, and adds entries to the OutShaderValue and fills them with a value converted that matches what a shader parameter structure expects (e.g. bool is converted to a 32-bit integer).