diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-29 06:59:57 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-29 06:59:57 +0000 |
| commit | 47ebe9b545d2efa9b60a735ee261d78eaa54aa57 (patch) | |
| tree | 87c7a295204d514ab214c33ab8306d1e4d414f55 /Graphics | |
| parent | Reworked C interface to optimize inheritance handling (diff) | |
| download | DiligentCore-47ebe9b545d2efa9b60a735ee261d78eaa54aa57.tar.gz DiligentCore-47ebe9b545d2efa9b60a735ee261d78eaa54aa57.zip | |
Fixed a number of minor issues
Diffstat (limited to 'Graphics')
8 files changed, 32 insertions, 21 deletions
diff --git a/Graphics/GraphicsEngine/interface/LoadEngineDll.h b/Graphics/GraphicsEngine/interface/LoadEngineDll.h index 9a65126e..833c05a7 100644 --- a/Graphics/GraphicsEngine/interface/LoadEngineDll.h +++ b/Graphics/GraphicsEngine/interface/LoadEngineDll.h @@ -66,7 +66,7 @@ inline FARPROC LoadEngineDll(const char* EngineName, const char* GetFactoryFuncN const char* Conf = "r"; #endif - sprintf_s(LibName, StringBufferSize, "%s%s%s.dll", EngineName, Conf, Arch); + sprintf_s(LibName, StringBufferSize, "%s%s%s.dll", EngineName, Arch, Conf); #if PLATFORM_WIN32 hModule = LoadLibraryA(LibName); diff --git a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp index 28ffb248..51d5f15d 100644 --- a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp @@ -316,9 +316,12 @@ void EngineFactoryD3D11Impl::CreateSwapChainD3D11(IRenderDevice* pDev #ifdef DOXYGEN /// Loads Direct3D11-based engine implementation and exports factory functions -/// \param [out] GetFactoryFunc - Pointer to the function that returns factory for D3D11 engine implementation -/// See EngineFactoryD3D11Impl. +/// +/// \return - Pointer to the function that returns factory for D3D11 engine implementation +/// See Diligent::EngineFactoryD3D11Impl. +/// /// \remarks Depending on the configuration and platform, the function loads different dll: +/// /// Platform\\Configuration | Debug | Release /// --------------------------|-------------------------------|---------------------------- /// x86 | GraphicsEngineD3D11_32d.dll | GraphicsEngineD3D11_32r.dll diff --git a/Graphics/GraphicsEngineD3D12/readme.md b/Graphics/GraphicsEngineD3D12/readme.md index 42ec0005..84d747c7 100644 --- a/Graphics/GraphicsEngineD3D12/readme.md +++ b/Graphics/GraphicsEngineD3D12/readme.md @@ -13,9 +13,8 @@ using namespace Diligent; // ... #if ENGINE_DLL - GetEngineFactoryD3D12Type GetEngineFactoryD3D12 = nullptr; - // Load the dll and import GetEngineFactoryD3D12() function - LoadGraphicsEngineD3D12(GetEngineFactoryD3D12); + // Load the dll and import GetEngineFactoryD3D12() function + auto GetEngineFactoryD3D12 = LoadGraphicsEngineD3D12(); #endif auto* pFactoryD3D12 = GetEngineFactoryD3D12(); EngineD3D12CreateInfo EngineCI; diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index bed9a84b..227dc3c2 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -511,15 +511,18 @@ void EngineFactoryD3D12Impl::EnumerateDisplayModes(DIRECT3D_FEATURE_LEVEL MinFea #ifdef DOXYGEN /// Loads Direct3D12-based engine implementation and exports factory functions -/// \param [out] GetFactoryFunc - Pointer to the function that returns factory for D3D12 engine implementation. -/// See EngineFactoryD3D12Impl. +/// +/// \return - Pointer to the function that returns factory for D3D12 engine implementation. +/// See Duiligent::EngineFactoryD3D12Impl. +/// /// \remarks Depending on the configuration and platform, the function loads different dll: +/// /// Platform\\Configuration | Debug | Release /// --------------------------|-------------------------------|---------------------------- /// x86 | GraphicsEngineD3D12_32d.dll | GraphicsEngineD3D12_32r.dll /// x64 | GraphicsEngineD3D12_64d.dll | GraphicsEngineD3D12_64r.dll /// -void LoadGraphicsEngineD3D12(GetEngineFactoryD3D12Type& GetFactoryFunc) +GetEngineFactoryD3D12Type LoadGraphicsEngineD3D12() { // This function is only required because DoxyGen refuses to generate documentation for a static function when SHOW_FILES==NO # error This function must never be compiled; diff --git a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h index 0d42a16e..cff83e54 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h @@ -107,7 +107,7 @@ typedef struct IEngineFactoryOpenGL* (*GetEngineFactoryOpenGLType)(); inline GetEngineFactoryOpenGLType LoadGraphicsEngineOpenGL() { - return (GetEngineFactoryOpenGLType)LoadEngineDll("GraphicsEngineGL", "GetEngineFactoryOpenGL"); + return (GetEngineFactoryOpenGLType)LoadEngineDll("GraphicsEngineOpenGL", "GetEngineFactoryOpenGL"); } #else diff --git a/Graphics/GraphicsEngineOpenGL/readme.md b/Graphics/GraphicsEngineOpenGL/readme.md index 0c3c204b..b59cde75 100644 --- a/Graphics/GraphicsEngineOpenGL/readme.md +++ b/Graphics/GraphicsEngineOpenGL/readme.md @@ -14,9 +14,9 @@ using namespace Diligent; // ... #if ENGINE_DLL - GetEngineFactoryOpenGLType GetEngineFactoryOpenGL; - if(!LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGL)) - return FALSE; + auto GetEngineFactoryOpenGL = LoadGraphicsEngineOpenGL(); + if (GetEngineFactoryOpenGL == nullptr) + return false; #endif RefCntAutoPtr<IRenderDevice> pRenderDevice; RefCntAutoPtr<IDeviceContext> pImmediateContext; diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index 024a7bfc..85372f5d 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -248,17 +248,20 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext(const EngineGLCreateInfo& #ifdef DOXYGEN /// Loads OpenGL-based engine implementation and exports factory functions -/// \param [out] GetFactoryFunc - Pointer to the function that returns pointer to the factory for -/// the OpenGL engine implementation -/// See EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(). +/// +/// \return - Pointer to the function that returns pointer to the factory for +/// the OpenGL engine implementation +/// See EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(). +/// /// \remarks Depending on the configuration and platform, the function loads different dll: -/// Platform\\Configuration | Debug | Release +/// +/// Platform\\Configuration | Debug | Release /// --------------------------|------------------------------|---------------------------- /// Win32/x86 | GraphicsEngineOpenGL_32d.dll | GraphicsEngineOpenGL_32r.dll /// Win32/x64 | GraphicsEngineOpenGL_64d.dll | GraphicsEngineOpenGL_64r.dll /// /// To load the library on Android, it is necessary to call System.loadLibrary("GraphicsEngineOpenGL") from Java. -void LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGLType& GetFactoryFunc) +GetEngineFactoryOpenGLType LoadGraphicsEngineOpenGL() { // This function is only required because DoxyGen refuses to generate documentation for a static function when SHOW_FILES==NO # error This function must never be compiled; diff --git a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp index b34a8689..4b863925 100644 --- a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp @@ -366,15 +366,18 @@ void EngineFactoryVkImpl::CreateSwapChainVk(IRenderDevice* pDevice, #ifdef DOXYGEN /// Loads Direct3D12-based engine implementation and exports factory functions -/// \param [out] GetFactoryFunc - Pointer to the function that returns factory for Vk engine implementation. -/// See EngineFactoryVkImpl. +/// +/// return - Pointer to the function that returns factory for Vk engine implementation. +/// See Diligent::EngineFactoryVkImpl. +/// /// \remarks Depending on the configuration and platform, the function loads different dll: +/// /// Platform\\Configuration | Debug | Release /// --------------------------|-------------------------------|---------------------------- /// x86 | GraphicsEngineVk_32d.dll | GraphicsEngineVk_32r.dll /// x64 | GraphicsEngineVk_64d.dll | GraphicsEngineVk_64r.dll /// -void LoadGraphicsEngineVk(GetEngineFactoryVkType& GetFactoryFunc) +GetEngineFactoryVkType LoadGraphicsEngineVk() { // This function is only required because DoxyGen refuses to generate documentation for a static function when SHOW_FILES==NO # error This function must never be compiled; |
