Merge pull request #1286 from OpenSpace/issue/1189

Add text to the render window if Tracy is enabled
This commit is contained in:
Alexander Bock
2020-08-24 13:58:58 +02:00
committed by GitHub
3 changed files with 27 additions and 5 deletions
+4 -4
View File
@@ -155,7 +155,7 @@ endif ()
# Ghoul
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul)
target_link_libraries(openspace-core Ghoul)
target_link_libraries(openspace-core PUBLIC Ghoul)
set_openspace_compile_settings(Ghoul)
set_folder_location(Lua "External")
set_folder_location(lz4 "External")
@@ -165,7 +165,7 @@ link_directories("${GHOUL_LIBRARY_DIRS}")
# Spice
begin_dependency("Spice")
add_subdirectory(${OPENSPACE_EXT_DIR}/spice)
target_link_libraries(openspace-core Spice)
target_link_libraries(openspace-core PUBLIC Spice)
set_folder_location(Spice "External")
end_dependency()
@@ -174,13 +174,13 @@ begin_dependency("CURL")
if (WIN32)
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl")
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include)
target_link_libraries(openspace-core ${CURL_ROOT_DIR}/lib/libcurl.lib)
target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib)
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB")
else ()
find_package(CURL)
if (CURL_FOUND)
target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(openspace-core ${CURL_LIBRARIES})
target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES})
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED")
endif ()
endif ()
+22
View File
@@ -1354,6 +1354,28 @@ void RenderEngine::renderVersionInformation() {
glm::vec4(0.5, 0.5, 0.5, 1.f)
);
}
#ifdef TRACY_ENABLE
{
// If we have Tracy enabled, we should inform the user about it that the
// application will crash after a while if no profiler is attached
ZoneScopedN("Tracy Information")
const glm::vec2 tracyBox = _fontInfo->boundingBox("TRACY PROFILING ENABLED");
const glm::vec2 penPosition = glm::vec2(
fontResolution().x - tracyBox.x - 10.f,
versionBox.y + commitBox.y + 5.f
);
FR::defaultRenderer().render(
*_fontInfo,
penPosition,
"TRACY PROFILING ENABLED",
glm::vec4(0.8f, 0.2f, 0.15f, 1.f)
);
}
#endif // TRACY_ENABLE
}
void RenderEngine::renderScreenLog() {
+1 -1
View File
@@ -143,7 +143,7 @@ function (handle_modules internal_module_path external_modules_paths)
# Only link openspace-core against the library if it has been set STATIC
get_target_property(library_type ${library_name} TYPE)
if (NOT ${library_type} STREQUAL "SHARED_LIBRARY")
target_link_libraries(openspace-core ${library_name})
target_link_libraries(openspace-core PUBLIC ${library_name})
endif()
create_define_name(${name} define_name)