Compiling with the latest Bullet3

Everything about development and the OpenMW source code.
Post Reply
Allofich
Posts: 104
Joined: 28 May 2016, 12:50

Compiling with the latest Bullet3

Post by Allofich »

Just to let anyone who tries to compile with the latest Bullet3 source code know, compilation of OpenMW will fail if you do so.

The problem seems to be related to this commit
https://github.com/bulletphysics/bullet ... 4932619140

I have a working build after resetting my local bullet repository to the previous commit, 0ae252f.
User avatar
psi29a
Posts: 5131
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Compiling with the latest Bullet3

Post by psi29a »

Is there any benefit from using Bullet3 with OpenMW? Not a loaded question, just curious.
Allofich
Posts: 104
Joined: 28 May 2016, 12:50

Re: Compiling with the latest Bullet3

Post by Allofich »

I don't know. I follow the Windows development setup guide by Gblues at
https://wiki.openmw.org/index.php?title=User:Gblues
which says to download the Bullet3 git repository. (I'm not blaming Gblues for anything, that page is very helpful)

Bullet3 is also being frequently updated, so I hoped that there may be some benefits to using the latest version.
User avatar
psi29a
Posts: 5131
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Compiling with the latest Bullet3

Post by psi29a »

The guide says:
Uncheck the following options:
BUILD_BULLET2_DEMOS
BUILD_BULLET3
BUILD_CPU_DEMOS
BUILD_EXTRAS
BUILD_OPENGL3_DEMOS
BUILD_UNIT_TESTS
So it builds Bullet2 from the Bullet3 repo, but disables the Bullet3 build. So no, we (and you) aren't using Bullet3 but Bullet2.

We usually only built against proper releases, not direct from the repo.
Allofich
Posts: 104
Joined: 28 May 2016, 12:50

Re: Compiling with the latest Bullet3

Post by Allofich »

I suppose it's not bullet3 then, but the compiler will still fail complaining about "CProfileManager" in debugwindow.cpp and physicssystem.cpp. I just tried again to make sure. I just brought it up because it's a stumbling block that you will come across currently if you try to build OpenMW with the latest bullet repository.
User avatar
psi29a
Posts: 5131
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Compiling with the latest Bullet3

Post by psi29a »

Certainly, thanks for bringing it up!

What was the error by the way? It might be something that needs to be brought to the attention of the Bullet devs.
Allofich
Posts: 104
Joined: 28 May 2016, 12:50

Re: Compiling with the latest Bullet3

Post by Allofich »

The errors are (from Visual Studio 2015)

for debugwindow.cpp

Code: Select all

4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(12): error C2065: 'CProfileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(12): error C2065: 'pit': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(12): error C2062: type 'int' unexpected
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(13): error C2143: syntax error: missing ';' before '{'
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(13): error C2447: '{': missing function header (old-style formal list?)
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(65): error C2065: 'CProfileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(65): error C2065: 'profileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(66): error C2065: 'profileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(66): error C2653: 'CProfileManager': is not a class or namespace name
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(66): error C3861: 'Get_Iterator': identifier not found
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(68): error C2065: 'profileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(68): error C3861: 'bulletDumpRecursive': identifier not found
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(70): error C2653: 'CProfileManager': is not a class or namespace name
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(70): error C2065: 'profileIterator': undeclared identifier
4>C:\OpenMW\src\apps\openmw\mwgui\debugwindow.cpp(70): error C3861: 'Release_Iterator': identifier not found
and for physicssystem.cpp

Code: Select all

4>C:\OpenMW\src\apps\openmw\mwphysics\physicssystem.cpp(1377): error C2653: 'CProfileManager': is not a class or namespace name
4>C:\OpenMW\src\apps\openmw\mwphysics\physicssystem.cpp(1377): error C3861: 'Reset': identifier not found
4>C:\OpenMW\src\apps\openmw\mwphysics\physicssystem.cpp(1378): error C2653: 'CProfileManager': is not a class or namespace name
4>C:\OpenMW\src\apps\openmw\mwphysics\physicssystem.cpp(1378): error C3861: 'Increment_Frame_Counter': identifier not found
However according to the commit I linked to up above, CProfileManager seems to have intentionally been disabled in Bullet, which I think causes these errors.
User avatar
AnyOldName3
Posts: 2216
Joined: 26 Nov 2015, 03:25

Re: Compiling with the latest Bullet3

Post by AnyOldName3 »

Bullet 3 adds the possibility to use the GPU for physics, so that could be a nice enhancement long-term, especially if features like cloth, hair and water physics are added to OpenMW. It does require changes at our end to make use of that, though.
AnyOldName3, Master of Shadows
Post Reply