From 548a41171d42ee34fa03b8a9d20ccfa5b90fe810 Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Fri, 7 Jun 2024 00:45:58 +0200 Subject: [PATCH] Add more warning notes --- libraries/gpu/src/gpu/Texture_ktx.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 67f8e9a621..f8a43bdb5b 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -53,6 +53,14 @@ struct GPUKTXPayload { TextureUsageType _usageType; glm::ivec2 _originalSize { 0, 0 }; + /** + * @brief Serialize the KTX payload + * + * @warning Be careful modifying this code, as it influences baked assets. + * Backwards compatibility must be maintained. + * + * @param ser Destination serializer + */ void serialize(DataSerializer &ser) { ser << CURRENT_VERSION; @@ -72,6 +80,16 @@ struct GPUKTXPayload { assert(ser.length() == GPUKTXPayload::SIZE); } + /** + * @brief Deserialize the KTX payload + * + * @warning Be careful modifying this code, as it influences baked assets. + * Backwards compatibility must be maintained. + * + * @param dsr Deserializer object + * @return true Successful + * @return false Version check failed + */ bool unserialize(DataDeserializer &dsr) { Version version = 0; uint32_t usageData = 0;