Polytonic / Glitter

Dead Simple OpenGL
http://polytonic.github.io/Glitter/
2.46k stars 416 forks source link

build error on mac 10.15.2 -error: argument value 10880 is outside the valid range [0, 255] #60

Closed oskycar closed 4 years ago

oskycar commented 4 years ago
截屏2020-02-11上午8 21 45

when build on mac os 10.15.2, I got that error!
I need do the such changes to fix this error:

diff --git a/src/LinearMath/btVector3.h b/src/LinearMath/btVector3.h index 61fd8d1e4..f0950646f 100644 --- a/src/LinearMath/btVector3.h +++ b/src/LinearMath/btVector3.h @@ -36,7 +36,8 @@ subject to the following restrictions:

pragma warning(disable : 4556) // value of intrinsic immediate argument '4294967239' is out of range '0 - 255'

endif

-#define BT_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x)) +//#define BT_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x)) +#define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff) //#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )

define bt_pshufd_ps(_a, _mask) _mm_shuffle_ps((_a), (_a), (_mask))

define bt_splat3_ps(_a, _i) bt_pshufd_ps((_a), BT_SHUFFLE(_i, _i, _i, 3))

Polytonic commented 4 years ago

Hmmm, looks like I need to do another dependency bump. I'll get on it this weekend.

KangWeon commented 4 years ago

It's on https://github.com/bulletphysics/bullet3/issues/2114#issuecomment-478287490

Girlsmile commented 4 years ago

42 define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)

//#define BT_SHUFFLE(x, y, z, w) ((w) << 6 | (z) << 4 | (y) << 2 | (x))

To fix it, replace this define in 'btVector3.h' file

Polytonic commented 4 years ago

Ah, I haven't been updating the submodules very regularly. I just did one now, which hopefully should contain the bullet fixes mentioned above.