Skip to content

Commit

Permalink
Fixed compile error of union declaration on Apple platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Jul 4, 2023
1 parent 8f6aee7 commit 4c510f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 11 additions & 10 deletions include/LLGL/Backend/Metal/NativeCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ struct NativeCommand
{
NativeCommandType type;

struct TessFactorBuffer
{
/**
\brief Specifies the buffer slot for the internal tessellation factor buffer. By default 30, which is the maximum buffer slot.
\remarks In the respective Metal tessellation kernel,
this must refer to a buffer of type \c MTLTriangleTessellationFactorsHalf or \c MTLQuadTessellationFactorsHalf.
*/
std::uint32_t slot;
};

union
{
struct TessFactorBuffer
{
/**
\brief Specifies the buffer slot for the internal tessellation factor buffer. By default 30, which is the maximum buffer slot.
\remarks In the respective Metal tessellation kernel,
this must refer to a buffer of type \c MTLTriangleTessellationFactorsHalf or \c MTLQuadTessellationFactorsHalf.
*/
std::uint32_t slot;
}
tessFactorBuffer;
TessFactorBuffer tessFactorBuffer;
};
};

Expand Down
1 change: 1 addition & 0 deletions sources/Renderer/Metal/Command/MTDirectCommandBuffer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <limits.h>

#include <LLGL/Backend/Metal/NativeHandle.h>
#include <LLGL/Backend/Metal/NativeCommand.h>


namespace LLGL
Expand Down

0 comments on commit 4c510f6

Please sign in to comment.