Skip to content

JavaCPP doesnt recognize C++ "struct alignas(16) Pixel" #1168

@eix128

Description

@eix128

JavaCPP doesnt recognize

// pixel
struct alignas(16) Pixel
{
	UNIGINE_INLINE Pixel() {}
	UNIGINE_INLINE Pixel(int r, int g = 0, int b = 0, int a = 0)
	{
		i.r = r;
		i.g = g;
		i.b = b;
		i.a = a;
	}
	UNIGINE_INLINE Pixel(float r, float g = 0.0f, float b = 0.0f, float a = 0.0f)
	{
		f.r = r;
		f.g = g;
		f.b = b;
		f.a = a;
	}
	union
	{
		Pixeli i;
		Pixelf f;
	};
};

ITs more standard way to align
check out on stackoverflow:

https://stackoverflow.com/questions/19958912/what-is-the-difference-between-struct-declspecalign16-sse-t-and-struct-ali

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions