@@ -113,8 +113,6 @@ namespace cage
113113 {
114114 Holder<Texture> texture;
115115 Holder<Model> mesh;
116-
117- CAGE_FORCE_INLINE void *cmpPtr () const { return (void *)((uintPtr)(void *)+texture ^ (uintPtr)(void *)+mesh); }
118116 };
119117
120118 struct RenderText : private Noncopyable
@@ -157,15 +155,15 @@ namespace cage
157155 auto cmp () const noexcept
158156 {
159157 return std::visit (
160- [this ](const auto &r) -> std::tuple<sint32, bool , Real, void *, bool >
158+ [this ](const auto &r) -> std::tuple<sint32, bool , Real, void *, void *, bool >
161159 {
162160 using T = std::decay_t <decltype (r)>;
163161 if constexpr (std::is_same_v<T, RenderModel>)
164- return { renderLayer, translucent, depth, +r.mesh , !!r.skeletalAnimation };
162+ return { renderLayer, translucent, depth, +r.mesh , nullptr , !!r.skeletalAnimation };
165163 if constexpr (std::is_same_v<T, RenderIcon>)
166- return { renderLayer, translucent, depth, r. cmpPtr () , false };
164+ return { renderLayer, translucent, depth, +r. mesh , +r. texture , false };
167165 if constexpr (std::is_same_v<T, RenderText>)
168- return { renderLayer, translucent, depth, +r.font , false };
166+ return { renderLayer, translucent, depth, +r.font , nullptr , false };
169167 return {};
170168 },
171169 data);
@@ -761,15 +759,15 @@ namespace cage
761759 const auto &mark = [](const RenderData &d)
762760 {
763761 return std::visit (
764- [&](const auto &r) -> std::tuple<void *, bool , bool >
762+ [&](const auto &r) -> std::tuple<void *, void *, bool , bool >
765763 {
766764 using T = std::decay_t <decltype (r)>;
767765 if constexpr (std::is_same_v<T, RenderModel>)
768- return { +r.mesh , !!r.skeletalAnimation , d.translucent };
766+ return { +r.mesh , nullptr , !!r.skeletalAnimation , d.translucent };
769767 if constexpr (std::is_same_v<T, RenderIcon>)
770- return { r. cmpPtr () , false , d.translucent };
768+ return { +r. mesh , +r. texture , false , d.translucent };
771769 if constexpr (std::is_same_v<T, RenderText>)
772- return { +r.font , false , d.translucent };
770+ return { +r.font , nullptr , false , d.translucent };
773771 return {};
774772 },
775773 d.data );
0 commit comments