16#ifndef AEONGAMES_PROTOBUFUTILS_H
17#define AEONGAMES_PROTOBUFUTILS_H
25#include "aeongames/Material.hpp"
33 class ComponentPropertyMsg;
Defines the Property variant type used for generic value storage.
Header for the quaternion class.
Header for the 3D vector class.
std::tuple< std::string, UniformValue > UniformKeyValue
Key-value pair mapping a uniform name to its value.
<- This is here just for the literals
DLL std::string GetPropertiesGLSL(const PipelineMsg &aPipelineMsg)
Generate GLSL property/uniform declarations from a pipeline message.
Property GetProperty(const ComponentPropertyMsg &aComponentPropertyMsg)
Convert a ComponentPropertyMsg protobuf message to a Property.
Transform GetTransform(const TransformMsg &aTransform)
Convert a TransformMsg protobuf message to a Transform.
std::variant< int, long, long long, unsigned, unsigned long, unsigned long long, float, double, std::string, std::filesystem::path > Property
A variant type that can hold any commonly used property value.
DLL uint32_t GetAttributes(const PipelineMsg &aPipelineMsg)
Get the packed attribute flags from a pipeline message.
DLL Material::UniformKeyValue PropertyToKeyValue(const PropertyMsg &aProperty)
Convert a PropertyMsg to a Material uniform key-value pair.
Vector3 GetVector3(const Vector3Msg &aVector3)
Convert a Vector3Msg protobuf message to a Vector3.
DLL uint32_t GetReferenceMsgId(const ReferenceMsg &reference_buffer)
Retrieve the identifier from a ReferenceMsg.
Quaternion GetQuaternion(const QuaternionMsg &aQuaternion)
Convert a QuaternionMsg protobuf message to a Quaternion.
DLL std::string GetAttributesGLSL(const PipelineMsg &aPipelineMsg)
Generate GLSL attribute declarations from a pipeline message.
size_t GetUniformBufferSize(const PipelineMsg &aPipelineMsg)
Calculate the uniform buffer size required by a pipeline.