summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-11-03 17:47:23 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-11-03 17:47:23 +0000
commitd8abce94cd08cb73527a9f9e1f12969ba3681ee6 (patch)
treed3cde96264cf2f86137cba39d9c61936c5915d8a /Graphics/GraphicsEngineVulkan
parentEnabled Vulkan backend build on Linux (diff)
downloadDiligentCore-d8abce94cd08cb73527a9f9e1f12969ba3681ee6.tar.gz
DiligentCore-d8abce94cd08cb73527a9f9e1f12969ba3681ee6.zip
Updated GetEngineFactoryVk() and GetEngineFactoryOpenGL() implementations
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt2
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/RenderDeviceFactoryVk.h20
-rw-r--r--Graphics/GraphicsEngineVulkan/src/GraphicsEngineVk.def2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp4
4 files changed, 8 insertions, 20 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index b4ed89c4..09148e3e 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -190,7 +190,7 @@ set(PUBLIC_DEPENDENCIES
target_link_libraries(GraphicsEngineVk-static PRIVATE ${PRIVATE_DEPENDENCIES} PUBLIC ${PUBLIC_DEPENDENCIES})
target_link_libraries(GraphicsEngineVk-shared PUBLIC GraphicsEngineVk-static)
-target_compile_definitions(GraphicsEngineVk-shared PUBLIC ENGINE_DLL=1 PRIVATE BUILDING_DLL=1)
+target_compile_definitions(GraphicsEngineVk-shared PUBLIC ENGINE_DLL=1)
if(PLATFORM_WIN32)
diff --git a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceFactoryVk.h b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceFactoryVk.h
index a6d9afb4..8e42c674 100644
--- a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceFactoryVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceFactoryVk.h
@@ -38,16 +38,8 @@
#elif PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS
-# if ENGINE_DLL
-# if BUILDING_DLL
- // https://gcc.gnu.org/wiki/Visibility
-# define API_QUALIFIER __attribute__((visibility("default")))
-# else
-# define API_QUALIFIER __attribute__((visibility("default")))
-# endif
-# else
-# define API_QUALIFIER
-# endif
+ // https://gcc.gnu.org/wiki/Visibility
+# define API_QUALIFIER __attribute__((visibility("default")))
#else
# error Unsupported platform
@@ -111,7 +103,7 @@ namespace Diligent
return false;
}
- GetFactoryFunc = reinterpret_cast<GetEngineFactoryVkType>(GetProcAddress(hModule, "GetEngineFactoryVkInternal"));
+ GetFactoryFunc = reinterpret_cast<GetEngineFactoryVkType>(GetProcAddress(hModule, "GetEngineFactoryVk"));
if (GetFactoryFunc == NULL)
{
std::stringstream ss;
@@ -126,11 +118,7 @@ namespace Diligent
#else
API_QUALIFIER
- inline IEngineFactoryVk* GetEngineFactoryVk()
- {
- IEngineFactoryVk* GetEngineFactoryVkInternal();
- return GetEngineFactoryVkInternal();
- }
+ IEngineFactoryVk* GetEngineFactoryVk();
#endif
diff --git a/Graphics/GraphicsEngineVulkan/src/GraphicsEngineVk.def b/Graphics/GraphicsEngineVulkan/src/GraphicsEngineVk.def
index c2834d59..a9ed58f5 100644
--- a/Graphics/GraphicsEngineVulkan/src/GraphicsEngineVk.def
+++ b/Graphics/GraphicsEngineVulkan/src/GraphicsEngineVk.def
@@ -1,2 +1,2 @@
EXPORTS
- GetEngineFactoryVkInternal \ No newline at end of file
+ GetEngineFactoryVk \ No newline at end of file
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
index ef78f426..6e572638 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
@@ -374,8 +374,8 @@ void LoadGraphicsEngineVk(GetEngineFactoryVkType &GetFactoryFunc)
}
#endif
-
-IEngineFactoryVk* GetEngineFactoryVkInternal()
+API_QUALIFIER
+IEngineFactoryVk* GetEngineFactoryVk()
{
return EngineFactoryVkImpl::GetInstance();
}