diff --git a/.gitignore b/.gitignore index aeaa6831..7a937c97 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ################################################################################ /build +.cxx \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 06d12a30..fe8f2366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,8 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE target_include_directories(MobileGL PUBLIC ${CMAKE_SOURCE_DIR}/include - ) + ${CMAKE_SOURCE_DIR}/3rdparty/DiligentCore +) add_subdirectory(3rdparty/DiligentCore) diff --git a/MG/Constants.h b/MG/Constants.h index 5f58509e..fc0a631d 100644 --- a/MG/Constants.h +++ b/MG/Constants.h @@ -177,6 +177,7 @@ namespace MG_Constants { #define BACKEND_VULKAN 0x0015 #define BACKEND_METAL 0x0016 #define BACKEND_GLES 0x0017 +#define BACKEND_DILIGENT 0x0018 } inline const char* RenderName = "MobileGL"; diff --git a/MG/Includes.h b/MG/Includes.h index 6763919c..8df9ab35 100644 --- a/MG/Includes.h +++ b/MG/Includes.h @@ -3,7 +3,7 @@ // #include "Constants.h" -#define BACKEND_TYPE BACKEND_GLES +#define BACKEND_TYPE BACKEND_DILIGENT #include "Global.h" #ifndef MOBILEGL_GLES_LOADER_H #include "MG_GL/BackendLoader/GLES/Loader.h" diff --git a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp index 0a9df20a..1cd65dd4 100644 --- a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp +++ b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp @@ -48,7 +48,12 @@ MG_EXPORT EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint MG_EXPORT EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) { LOAD_EGL(eglCreateWindowSurface) - return egl_eglCreateWindowSurface(dpy, config, win, attrib_list); + EGLSurface surface = egl_eglCreateWindowSurface(dpy, config, win, attrib_list); + +// auto* pFactoryOpenGL = GetEngineFactoryOpenGL(); + + + return surface; } MG_EXPORT EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) {