8 #ifndef LLUVIA_CORE_NODE_PORT_DESCRIPTOR_H_
9 #define LLUVIA_CORE_NODE_PORT_DESCRIPTOR_H_
37 const std::string& name,
45 const std::
string&
getName() const noexcept;
61 std::pair<
bool, std::
string>
isValid(const std::shared_ptr<
ll::
Object>& port) const noexcept;
65 std::pair<
bool, std::
string> validateBuffer(const std::shared_ptr<
ll::
Buffer>& port) const noexcept;
66 std::pair<
bool, std::
string> validateImageView(const std::shared_ptr<
ll::
ImageView>& port) const noexcept;
68 std::
string toString() const noexcept;
73 uint32_t m_binding {0};
74 std::string m_name {};
79 std::optional<ll::ChannelCount> m_checkImageChannelCount {};
80 std::optional<std::vector<ll::ChannelType>> m_checkImageChannelType {};
81 std::optional<bool> m_checkImageViewNormalizedCoordinates {};
ImageDescriptor class and related enumerations.
Objects to manage raw portions of allocated memory.
Definition: Buffer.h:57
Represents portions of a ll::Image to be sent as parameter to a GLSL shader.
Definition: ImageView.h:149
Base class for all types that can be used in computer shaders.
Definition: Object.h:94
Definition: PortDescriptor.h:27
~PortDescriptor()=default
PortDescriptor(PortDescriptor &&descriptor)=default
PortDescriptor & checkImageChannelCountIs(ll::ChannelCount channelCount) noexcept
ll::PortDirection getDirection() const noexcept
PortDescriptor & checkImageChannelTypeIsAnyOf(std::vector< ll::ChannelType > channelTypes) noexcept
PortDescriptor & checkImageChannelTypeIs(ll::ChannelType channelType) noexcept
PortDescriptor(const PortDescriptor &descriptor)=default
const std::string & getName() const noexcept
PortDescriptor & operator=(PortDescriptor &&descriptor)=default
PortDescriptor & checkImageViewNormalizedCoordinatesIs(bool normalizedCoordinates) noexcept
PortDescriptor(uint32_t binding, const std::string &name, ll::PortDirection direction, ll::PortType portType)
ll::PortType getPortType() const noexcept
uint32_t getBinding() const noexcept
PortDescriptor & operator=(const PortDescriptor &descriptor)=default
std::pair< bool, std::string > isValid(const std::shared_ptr< ll::Object > &port) const noexcept
Checks whether or not a given Object is a valid port.
PortDirection
Class for port direction.
Definition: PortDirection.h:19
ChannelType
Supported image channel types.
Definition: ImageDescriptor.h:33
PortType
Port types.
Definition: PortType.h:21
ChannelCount
Supported image channel count.
Definition: ImageDescriptor.h:53