OpenTomb icon indicating copy to clipboard operation
OpenTomb copied to clipboard

How to handle Bullet?

Open vvs- opened this issue 9 years ago • 11 comments

As we already saw Bullet 2.82 is broken. That effectively makes CMake project broken as well, because nobody ships Bullet 2.83 in known Linux distributions. The question is: should we return Bullet as a submodule?

vvs- avatar Jul 23 '15 19:07 vvs-

I guess there's no way around until 2.83+ becomes widely available. Until then, I'd suggest another approach for building bullet: instead of using add_subdirectory, we should use add_custom_target etc. in conjunction with the system commands to simulate a separate build. With this approach, we can be sure to not mess with bullet's internal build config.

stohrendorf avatar Jul 23 '15 19:07 stohrendorf

How it is possible that buggy Bullet is distributed with Linux at all? :imp: Maybe there's a way for CMake to check Bullet version? And if not, then use a submodule?

Lwmte avatar Jul 24 '15 04:07 Lwmte

If they'd fixed it, there would be different behavior with different releases (patched and unpatched). But as long as we avoid using bullet's conversion functions, there shouldn't be any problem with the system lib, I think.

stohrendorf avatar Jul 24 '15 05:07 stohrendorf

I actually believe that my bug with rotation is also related to Bullet. It happened one more time, but after full rebuild it gone away... :angry:

Lwmte avatar Jul 24 '15 09:07 Lwmte

I've implemented possibility to optionally compile Bullet as a third party library. Just clone Bullet in 3rdparty/bullet and remove any alternatives. If there is a system library it will be preferred.

vvs- avatar Jul 25 '15 13:07 vvs-

About engine build: I was trying GCC_TDM_5.1_x86_x64 (universal compiler version) and GCC_TDM_5.1_x86 only version and rebuild engine for x86 platform. Same code, same compiler and linker flags, both PE are i386 compatible, BUT different Bullet working! GCC_TDM_5.1_x86_x64 produce build with pretty buggy physics. And in all cases was -O2 (-O3 did not increase fps); GCC_TDM_5.1_x86 only produce build with correct bullet behavior.

TeslaRus avatar Jul 30 '15 16:07 TeslaRus

Right. I only use gcc 4.9.2 and don't even think about upgrading. I usually upgrade once in a two-three years and every time it's a big pain in the butt. I don't want to spend a few weeks just to fix all the brokenness.

vvs- avatar Jul 30 '15 17:07 vvs-

gcc 4.9.2 is a good version, 5.1 x86 not bad too. In my case using x64 compiler version was a very big pain in the butt. This time I working in new place (programmer) and study corporate programming techniques :-) Too many experience, but little time + I need more practice. Hope I will find more time for OT project little later. To Cochrane: may be offtop, but I have idea how to complete remove sticks for colored polygons: add manually white texture to the atlas (4x4 or 8x8) as a first unique texture and use special atlas function to assign white texture coordinates for polygons in tr_setupColoredFace(...);

TeslaRus avatar Jul 30 '15 18:07 TeslaRus

To Cochrane: may be offtop, but I have idea how to complete remove sticks for colored polygons: add manually white texture to the atlas (4x4 or 8x8) as a first unique texture and use special atlas function to assign white texture coordinates for polygons in tr_setupColoredFace(...);

We're already doing that. Ever since the bordered texture atlas was introduced.

cochrane avatar Aug 04 '15 16:08 cochrane

At least for my linux distribution (gentoo) bullet 2.83.4 is default stable version and latest unstable is 2.86 so this issue is probably outdated!?

Sur3 avatar Mar 13 '18 21:03 Sur3

Probably it is. But it might have other issues as well, e.g. Bullet is plagued with performance issues depending on compiler and optimization. Changing horses in midstream is dangerous, at least without wide test coverage.

vvs- avatar Mar 13 '18 21:03 vvs-