summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
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/GraphicsEngineOpenGL
parentEnabled Vulkan backend build on Linux (diff)
downloadDiligentCore-d8abce94cd08cb73527a9f9e1f12969ba3681ee6.tar.gz
DiligentCore-d8abce94cd08cb73527a9f9e1f12969ba3681ee6.zip
Updated GetEngineFactoryVk() and GetEngineFactoryOpenGL() implementations
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/CMakeLists.txt2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h24
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GraphicsEngineOpenGL.def2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp4
4 files changed, 11 insertions, 21 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
index d32bab6b..913282a8 100644
--- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
+++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
@@ -196,7 +196,7 @@ endif()
target_link_libraries(GraphicsEngineOpenGL-static PRIVATE ${PRIVATE_DEPENDENCIES} PUBLIC ${PUBLIC_DEPENDENCIES})
target_link_libraries(GraphicsEngineOpenGL-shared PUBLIC GraphicsEngineOpenGL-static)
-target_compile_definitions(GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL=1 PRIVATE BUILDING_DLL=1)
+target_compile_definitions(GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL=1)
if(PLATFORM_WIN32)
diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
index 8d852c9f..b931630e 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceFactoryOpenGL.h
@@ -36,23 +36,17 @@
#include "EngineGLAttribs.h"
-#if PLATFORM_WIN32 || PLATFORM_UNIVERSAL_WINDOWS
+#if PLATFORM_WIN32
# define API_QUALIFIER
#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
#endif
namespace Diligent
@@ -105,7 +99,7 @@ public:
return false;
}
- GetFactoryFunc = reinterpret_cast<GetEngineFactoryOpenGLType>( GetProcAddress(hModule, "GetEngineFactoryOpenGLInternal") );
+ GetFactoryFunc = reinterpret_cast<GetEngineFactoryOpenGLType>( GetProcAddress(hModule, "GetEngineFactoryOpenGL") );
if( GetFactoryFunc == NULL )
{
std::stringstream ss;
@@ -121,11 +115,7 @@ public:
// Do not forget to call System.loadLibrary("GraphicsEngineOpenGL") in Java on Android!
API_QUALIFIER
- inline IEngineFactoryOpenGL* GetEngineFactoryOpenGL()
- {
- IEngineFactoryOpenGL* GetEngineFactoryOpenGLInternal();
- return GetEngineFactoryOpenGLInternal();
- }
+ IEngineFactoryOpenGL* GetEngineFactoryOpenGL();
#endif
diff --git a/Graphics/GraphicsEngineOpenGL/src/GraphicsEngineOpenGL.def b/Graphics/GraphicsEngineOpenGL/src/GraphicsEngineOpenGL.def
index 1de05b4c..2d2ee59f 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GraphicsEngineOpenGL.def
+++ b/Graphics/GraphicsEngineOpenGL/src/GraphicsEngineOpenGL.def
@@ -1,2 +1,2 @@
EXPORTS
- GetEngineFactoryOpenGLInternal \ No newline at end of file
+ GetEngineFactoryOpenGL \ No newline at end of file
diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
index 435a655f..cc959951 100644
--- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceFactoryOpenGL.cpp
@@ -234,8 +234,8 @@ void EngineFactoryOpenGLImpl::CreateHLSL2GLSLConverter(IHLSL2GLSLConverter **ppC
pConverter->QueryInterface( IID_HLSL2GLSLConverter, reinterpret_cast<IObject**>(ppConverter) );
}
-
-Diligent::IEngineFactoryOpenGL* GetEngineFactoryOpenGLInternal()
+API_QUALIFIER
+Diligent::IEngineFactoryOpenGL* GetEngineFactoryOpenGL()
{
return Diligent::EngineFactoryOpenGLImpl::GetInstance();
}