Last active
March 25, 2020 16:41
-
-
Save matlabbe/f133f555d650e3ab5c51d3b772f02448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMake/vtkAndroid.cmake b/CMake/vtkAndroid.cmake | |
index 2ef512c5f7..3cdc39b376 100644 | |
--- a/CMake/vtkAndroid.cmake | |
+++ b/CMake/vtkAndroid.cmake | |
@@ -142,7 +142,9 @@ macro(crosscompile target api abi out_build_dir) | |
CMAKE_ARGS | |
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target} | |
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} | |
- -DCMAKE_TOOLCHAIN_FILE:PATH=${_ANDROID_TOOLCHAIN} | |
+ -DANDROID_ABI:BOOL=arm64-v8a | |
+ -DANDROID_NATIVE_API_LEVEL:BOOL=24 | |
+ -DCMAKE_TOOLCHAIN_FILE:PATH=/opt/android-ndk-r21/build/cmake/android.toolchain.cmake | |
-DVTKCompileTools_DIR:PATH=${CMAKE_BINARY_DIR}/CompileTools | |
${android_cmake_flags} | |
) | |
diff --git a/Common/Core/vtkAndroidOutputWindow.cxx b/Common/Core/vtkAndroidOutputWindow.cxx | |
index 83fd772c4e..84ec9c768c 100644 | |
--- a/Common/Core/vtkAndroidOutputWindow.cxx | |
+++ b/Common/Core/vtkAndroidOutputWindow.cxx | |
@@ -45,7 +45,7 @@ void vtkAndroidOutputWindow::DisplayErrorText(const char* someText) | |
std::string line; | |
while (std::getline(stream, line)) | |
{ | |
- __android_log_print(ANDROID_LOG_ERROR, "VTK", line.c_str()); | |
+ __android_log_print(ANDROID_LOG_ERROR, "VTK", "%s", line.c_str()); | |
} | |
this->InvokeEvent(vtkCommand::ErrorEvent, (void*)someText); | |
} | |
@@ -62,7 +62,7 @@ void vtkAndroidOutputWindow::DisplayWarningText(const char* someText) | |
std::string line; | |
while (std::getline(stream, line)) | |
{ | |
- __android_log_print(ANDROID_LOG_WARN, "VTK", line.c_str()); | |
+ __android_log_print(ANDROID_LOG_WARN, "VTK", "%s", line.c_str()); | |
} | |
this->InvokeEvent(vtkCommand::WarningEvent,(void*) someText); | |
} | |
@@ -79,7 +79,7 @@ void vtkAndroidOutputWindow::DisplayGenericWarningText(const char* someText) | |
std::string line; | |
while (std::getline(stream, line)) | |
{ | |
- __android_log_print(ANDROID_LOG_WARN, "VTK", line.c_str()); | |
+ __android_log_print(ANDROID_LOG_WARN, "VTK", "%s", line.c_str()); | |
} | |
} | |
@@ -95,7 +95,7 @@ void vtkAndroidOutputWindow::DisplayDebugText(const char* someText) | |
std::string line; | |
while (std::getline(stream, line)) | |
{ | |
- __android_log_print(ANDROID_LOG_DEBUG, "VTK", line.c_str()); | |
+ __android_log_print(ANDROID_LOG_DEBUG, "VTK", "%s", line.c_str()); | |
} | |
} | |
@@ -111,7 +111,7 @@ void vtkAndroidOutputWindow::DisplayText(const char* someText) | |
std::string line; | |
while (std::getline(stream, line)) | |
{ | |
- __android_log_print(ANDROID_LOG_INFO, "VTK", line.c_str()); | |
+ __android_log_print(ANDROID_LOG_INFO, "VTK", "%s", line.c_str()); | |
} | |
} | |
diff --git a/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx b/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx | |
index 03cd54cbea..0341b75962 100644 | |
--- a/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx | |
+++ b/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx | |
@@ -1578,13 +1578,13 @@ void vtkOpenGLPolyDataMapper::ReplaceShaderDepth( | |
{ | |
// If MSAA is enabled, don't write to gl_FragDepth unless we absolutely have | |
// to. See VTK issue 16899. | |
-#if GL_ES_VERSION_3_0 != 1 | |
- bool multisampling = glIsEnabled(GL_MULTISAMPLE) == GL_TRUE; | |
-#else | |
+//#if GL_ES_VERSION_3_0 != 1 | |
+// bool multisampling = glIsEnabled(GL_MULTISAMPLE) == GL_TRUE; | |
+//#else | |
bool multisample = false; | |
-#endif | |
+//#endif | |
- if (!multisampling) | |
+ if (!multisample) | |
{ | |
std::string FSSource = shaders[vtkShader::Fragment]->GetSource(); | |
vtkShaderProgram::Substitute(FSSource, | |
diff --git a/Rendering/OpenGL2/vtkOpenGLRenderer.cxx b/Rendering/OpenGL2/vtkOpenGLRenderer.cxx | |
index 362963ef3d..7d43ae249c 100644 | |
--- a/Rendering/OpenGL2/vtkOpenGLRenderer.cxx | |
+++ b/Rendering/OpenGL2/vtkOpenGLRenderer.cxx | |
@@ -636,11 +636,11 @@ void vtkOpenGLRenderer::DevicePickRender() | |
vtkOpenGLClearErrorMacro(); | |
bool msaaWasEnabled = false; | |
- if (this->RenderWindow->GetMultiSamples() > 0 && glIsEnabled(GL_MULTISAMPLE)) | |
- { | |
- glDisable(GL_MULTISAMPLE); | |
- msaaWasEnabled = true; | |
- } | |
+ //if (this->RenderWindow->GetMultiSamples() > 0 && glIsEnabled(GL_MULTISAMPLE)) | |
+ //{ | |
+ // glDisable(GL_MULTISAMPLE); | |
+ // msaaWasEnabled = true; | |
+ // } | |
this->UpdateCamera(); | |
this->UpdateLightGeometry(); | |
@@ -650,10 +650,10 @@ void vtkOpenGLRenderer::DevicePickRender() | |
this->PickInfo->PerformedHardwarePick = true; | |
- if (msaaWasEnabled) | |
- { | |
- glEnable(GL_MULTISAMPLE); | |
- } | |
+// if (msaaWasEnabled) | |
+// { | |
+// glEnable(GL_MULTISAMPLE); | |
+// } | |
vtkOpenGLCheckErrorMacro("failed after DevicePickRender"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment