summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-28 18:45:43 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-28 18:45:43 +0000
commit5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d (patch)
tree76b4d1299cb573311918f0ac566a157e029e67bc /Graphics/GraphicsEngineOpenGL
parentReworked IShaderD3D::GetHLSLResource method to be compatible wit C (diff)
downloadDiligentCore-5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d.tar.gz
DiligentCore-5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d.zip
Reworked C inteface method calls to use CALL_IFACE_METHOD macro
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/BufferGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h4
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h6
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/QueryGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h6
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/interface/TextureGL.h4
7 files changed, 13 insertions, 13 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
index de79bde9..26c3b377 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h
@@ -65,7 +65,7 @@ typedef struct IBufferGL
struct IBufferGLVtbl* pVtbl;
} IBufferGL;
-# define IBufferGL_GetGLBufferHandle(This) (This)->pVtbl->BufferGL.GetGLBufferHandle((IBufferGL*)(This))
+# define IBufferGL_GetGLBufferHandle(This) CALL_IFACE_METHOD(BufferGL, GetGLBufferHandle, This)
#endif
diff --git a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
index dc002ca2..523c85a8 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
@@ -84,8 +84,8 @@ typedef struct IDeviceContextGL
// clang-format off
-# define IDeviceContextGL_UpdateCurrentGLContext(This) (This)->pVtbl->DeviceContextGL.UpdateCurrentGLContext((IDeviceContextGL*)(This))
-# define IDeviceContextGL_SetSwapChain(This, ...) (This)->pVtbl->DeviceContextGL.SetSwapChain((IDeviceContextGL*)(This), __VA_ARGS__)
+# define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
+# define IDeviceContextGL_SetSwapChain(This, ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)
// clang-format on
diff --git a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h
index bc6e67e6..60b9f4c8 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h
@@ -101,9 +101,9 @@ typedef struct IEngineFactoryOpenGL
// clang-format off
-# define IEngineFactoryOpenGL_CreateDeviceAndSwapChainGL(This, ...) (This)->pVtbl->EngineFactoryOpenGL.CreateDeviceAndSwapChainGL((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
-# define IEngineFactoryOpenGL_CreateHLSL2GLSLConverter(This, ...) (This)->pVtbl->EngineFactoryOpenGL.CreateHLSL2GLSLConverter ((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
-# define IEngineFactoryOpenGL_AttachToActiveGLContext(This, ...) (This)->pVtbl->EngineFactoryOpenGL.AttachToActiveGLContext ((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
+# define IEngineFactoryOpenGL_CreateDeviceAndSwapChainGL(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, CreateDeviceAndSwapChainGL, This, __VA_ARGS__)
+# define IEngineFactoryOpenGL_CreateHLSL2GLSLConverter(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, CreateHLSL2GLSLConverter, This, __VA_ARGS__)
+# define IEngineFactoryOpenGL_AttachToActiveGLContext(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, AttachToActiveGLContext, This, __VA_ARGS__)
// clang-format on
diff --git a/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h b/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h
index 2d03d989..27749494 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h
@@ -66,7 +66,7 @@ typedef struct IQueryGL
struct IQueryGLVtbl* pVtbl;
} IQueryGL;
-# define IQueryGL_GetGlQueryHandle(This) (This)->pVtbl->QueryGL.GetGlQueryHandle((IQueryGL*)(This))
+# define IQueryGL_GetGlQueryHandle(This) CALL_IFACE_METHOD(QueryGL, GetGlQueryHandle, This)
#endif
diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
index b697897d..db508a1b 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h
@@ -126,9 +126,9 @@ typedef struct IRenderDeviceGL
// clang-format off
-# define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)(This)->pVtbl->RenderDeviceGL.CreateTextureFromGLHandle ((IRenderDeviceGL*)(This), __VA_ARGS__)
-# define IRenderDeviceGL_CreateBufferFromGLHandle(This, ...) (This)->pVtbl->RenderDeviceGL.CreateBufferFromGLHandle((IRenderDeviceGL*)(This), __VA_ARGS__)
-# define IRenderDeviceGL_CreateDummyTexture(This, ...) (This)->pVtbl->RenderDeviceGL.CreateDummyTexture((IRenderDeviceGL*)(This), __VA_ARGS__)
+# define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)CALL_IFACE_METHOD(RenderDeviceGL, CreateTextureFromGLHandle, This, __VA_ARGS__)
+# define IRenderDeviceGL_CreateBufferFromGLHandle(This, ...) CALL_IFACE_METHOD(RenderDeviceGL, CreateBufferFromGLHandle, This, __VA_ARGS__)
+# define IRenderDeviceGL_CreateDummyTexture(This, ...) CALL_IFACE_METHOD(RenderDeviceGL, CreateDummyTexture, This, __VA_ARGS__)
// clang-format on
diff --git a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
index e942da14..88d8d29e 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h
@@ -67,7 +67,7 @@ typedef struct ISwapChainGL
// clang-format off
-# define ISwapChainGL_GetDefaultFBO(This) (This)->pVtbl->SwapChainGL.GetDefaultFBO((ISwapChainGL*)(This))
+# define ISwapChainGL_GetDefaultFBO(This) CALL_IFACE_METHOD(SwapChainGL, GetDefaultFBO, This)
// clang-format on
diff --git a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
index 6d4d2137..7d8e9306 100644
--- a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
+++ b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h
@@ -70,8 +70,8 @@ typedef struct ITextureGL
// clang-format off
-# define ITextureGL_GetGLTextureHandle(This) (This)->pVtbl->TextureGL.GetGLTextureHandle((ITextureGL*)(This))
-# define ITextureGL_GetBindTarget(This) (This)->pVtbl->TextureGL.GetBindTarget ((ITextureGL*)(This))
+# define ITextureGL_GetGLTextureHandle(This) CALL_IFACE_METHOD(TextureGL, GetGLTextureHandle, This)
+# define ITextureGL_GetBindTarget(This) CALL_IFACE_METHOD(TextureGL, GetBindTarget, This)
// clang-format on