diff --git a/MG/Constants.h b/MG/Constants.h index 8940a284..97be1fac 100644 --- a/MG/Constants.h +++ b/MG/Constants.h @@ -187,7 +187,7 @@ namespace MG_Constants { #define BACKEND_DILIGENT 0x0018 inline const int BACKEND_DILIGENT_VULKAN = 0x0020; -inline const int BACKEND_DILIGENT_METAL = 0x0021; // not ready currently +inline const int BACKEND_DILIGENT_METAL = 0x0021; // not ready currently inline const int BACKEND_DILIGENT_OPENGL = 0x0022; } diff --git a/MG/Includes.h b/MG/Includes.h index d8b828ea..078952db 100644 --- a/MG/Includes.h +++ b/MG/Includes.h @@ -84,6 +84,8 @@ #include "MG_RHI/GLES/Test/TestDrawing.h" #endif +#include "MG_GL/Implementations/EGL/Diligent/DiligentConfig.h" + #include #include #include diff --git a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h b/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h index 40a4e64b..24c1c409 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h +++ b/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h @@ -5,6 +5,6 @@ #pragma once #include "../../../../Includes.h" -namespace MG_EGL::Diligent { +namespace MG_Diligent { inline const int DILIGENT_BACKEND_TYPE = MG_Constants::Backend::BACKEND_DILIGENT_VULKAN; } \ No newline at end of file diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h index c9ab159a..bda93697 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h @@ -6,7 +6,6 @@ #define MOBILEGL_DILIGENT_EGL_IMPL_H #include "../../../../Includes.h" -#include "DiligentConfig.h" #if BACKEND_TYPE == BACKEND_DILIGENT diff --git a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp index 1b8ca3ba..c1ab0a2a 100644 --- a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp +++ b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp @@ -13,7 +13,16 @@ namespace MG_GL::Getter { #elif BACKEND_TYPE == BACKEND_GLES return "OpenGL ES"; #elif BACKEND_TYPE == BACKEND_DILIGENT - return "Diligent"; + switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { + case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: + return "DiligentEngine (Vulkan)"; + case MG_Constants::Backend::BACKEND_DILIGENT_METAL: + return "DiligentEngine (Metal)"; + case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: + return "DiligentEngine (OpenGL)"; + default: + return "DiligentEngine (Unknown Backend)"; + } #else return ""; #endif @@ -27,7 +36,16 @@ namespace MG_GL::Getter { #elif BACKEND_TYPE == BACKEND_GLES return "MobileGlues"; #elif BACKEND_TYPE == BACKEND_DILIGENT - return "MobileGluDiligent"; + switch (MG_Diligent::DILIGENT_BACKEND_TYPE) { + case MG_Constants::Backend::BACKEND_DILIGENT_VULKAN: + return "MobileGlued-vk"; + case MG_Constants::Backend::BACKEND_DILIGENT_METAL: + return "MobileGlued-mtl"; + case MG_Constants::Backend::BACKEND_DILIGENT_OPENGL: + return "MobileGlued-gl"; + default: + return "MobileGlued-unknown"; + } #else return ""; #endif