Fix conflict

This commit is contained in:
Daniel Chappuis 2020-11-26 22:53:28 +01:00
commit b0ccdb6cc1
4 changed files with 9 additions and 2 deletions

View File

@ -163,7 +163,7 @@ void FixedJointComponents::moveComponentToIndex(uint32 srcIndex, uint32 destInde
new (mR2World + destIndex) Vector3(mR2World[srcIndex]);
new (mI1 + destIndex) Matrix3x3(mI1[srcIndex]);
new (mI2 + destIndex) Matrix3x3(mI2[srcIndex]);
new (mImpulseTranslation + destIndex) Vector3(mImpulseRotation[srcIndex]);
new (mImpulseTranslation + destIndex) Vector3(mImpulseTranslation[srcIndex]);
new (mImpulseRotation + destIndex) Vector3(mImpulseRotation[srcIndex]);
new (mInverseMassMatrixTranslation + destIndex) Matrix3x3(mInverseMassMatrixTranslation[srcIndex]);
new (mInverseMassMatrixRotation + destIndex) Matrix3x3(mInverseMassMatrixRotation[srcIndex]);

View File

@ -355,7 +355,7 @@ void SolveFixedJointSystem::solvePositionConstraint() {
// Compute the pseudo velocity of body 1
const Vector3 v1 = inverseMassBody1 * linearImpulseBody1;
Vector3 w1 = mFixedJointComponents.mI2[i] * angularImpulseBody1;
Vector3 w1 = mFixedJointComponents.mI1[i] * angularImpulseBody1;
// Update the body position/orientation of body 1
x1 += v1;

View File

@ -8,6 +8,7 @@ project(Testbed)
set(NANOGUI_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
set(NANOGUI_BUILD_PYTHON OFF CACHE BOOL " " FORCE)
set(NANOGUI_INSTALL OFF CACHE BOOL " " FORCE)
set(NANOGUI_BACKEND OpenGL CACHE BOOL " " FORCE)
# ---- Make sure to recursively clone all the git submodules for external libraries (nanogui) --- #
find_package(Git QUIET)

View File

@ -103,12 +103,15 @@ void TestbedApplication::init() {
glGetIntegerv(GL_MAJOR_VERSION, &glMajorVersion);
glGetIntegerv(GL_MINOR_VERSION, &glMinorVersion);
#ifdef GL_DEBUG_OUTPUT
if (glMajorVersion > 4 || (glMajorVersion == 4 && glMinorVersion >= 3)) {
// Enable OpenGL error reporting
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallback(onOpenGLError, 0);
}
#endif
mIsInitialized = true;
}
@ -332,6 +335,7 @@ void TestbedApplication::notifyEngineSetttingsChanged() {
void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
const GLchar* message, const void* userParam ) {
#ifdef GL_DEBUG_OUTPUT
if (type == GL_DEBUG_TYPE_ERROR) {
/*
fprintf( stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
@ -339,6 +343,8 @@ void GLAPIENTRY TestbedApplication::onOpenGLError(GLenum source, GLenum type, GL
type, severity, message );
*/
}
#endif
}
// Compute the FPS