mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Add text to the render window if Tracy is enabled
This commit is contained in:
@@ -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 ()
|
||||
@@ -206,7 +206,7 @@ if (MSVC)
|
||||
if (OPENSPACE_ENABLE_VLD)
|
||||
begin_dependency("Visual Leak Detector")
|
||||
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_ENABLE_VLD")
|
||||
target_link_libraries(openspace-core ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib)
|
||||
target_link_libraries(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib)
|
||||
target_include_directories(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld)
|
||||
end_dependency()
|
||||
endif ()
|
||||
@@ -217,7 +217,7 @@ if (MSVC)
|
||||
begin_dependency("Intel VTune")
|
||||
target_compile_definitions(openspace-core PUBLIC "OPENSPACE_HAS_VTUNE")
|
||||
target_include_directories(openspace-core PUBLIC "${OPENSPACE_VTUNE_PATH}/include")
|
||||
target_link_libraries(openspace-core "${OPENSPACE_VTUNE_PATH}/lib64/libittnotify.lib")
|
||||
target_link_libraries(openspace-core PUBLIC "${OPENSPACE_VTUNE_PATH}/lib64/libittnotify.lib")
|
||||
end_dependency()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user