Page 1 of 1

Compiling with the latest Bullet3

Posted: 29 Jul 2016, 08:54
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.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 09:58
by psi29a
Is there any benefit from using Bullet3 with OpenMW? Not a loaded question, just curious.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 10:21
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.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 13:14
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.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 14:38
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.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 15:09
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.

Re: Compiling with the latest Bullet3

Posted: 29 Jul 2016, 16:47
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.

Re: Compiling with the latest Bullet3

Posted: 01 Aug 2016, 00:00
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.