Skip to content

Commit

Permalink
IDeviceContextGL: fix include test
Browse files Browse the repository at this point in the history
  • Loading branch information
WangHoi authored and TheMostDiligent committed Oct 20, 2024
1 parent 7816066 commit b54e515
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContextGL, IDeviceContext)
/// is passed over from the main application.
///
/// \return false if there is no active GL context, and true otherwise.
VIRTUAL bool METHOD(UpdateCurrentGLContext)(THIS_) PURE;
VIRTUAL Bool METHOD(UpdateCurrentGLContext)(THIS) PURE;

/// Purge current context caches (e.g. VAO, FBO).

/// If an application uses multiple GL contexts, this method must be called
/// before the current context is about to be released,
/// to let the engine cleanup internal OpenGL object caches.
VIRTUAL void METHOD(PurgeCurrentContextCaches)(THIS_) PURE;
VIRTUAL void METHOD(PurgeCurrentContextCaches)(THIS) PURE;

/// Sets the swap in the device context. The swap chain is used by the device context
/// to obtain the default FBO handle.
Expand All @@ -81,8 +81,9 @@ DILIGENT_END_INTERFACE

// clang-format off

# define IDeviceContextGL_UpdateCurrentGLContext(This, ...) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This, __VA_ARGS__)
# define IDeviceContextGL_SetSwapChain(This, ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)
# define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
# define IDeviceContextGL_PurgeCurrentContextCaches(This) CALL_IFACE_METHOD(DeviceContextGL, PurgeCurrentContextCaches, This)
# define IDeviceContextGL_SetSwapChain(This, ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)

// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

void TestDeviceContextGL_CInterface(IDeviceContextGL* pCtxGL)
{
bool res = IDeviceContextGL_UpdateCurrentGLContext(pCtxGL, true);
bool res = IDeviceContextGL_UpdateCurrentGLContext(pCtxGL);
(void)res;
IDeviceContextGL_PurgeCurrentContextCaches(pCtxGL);
IDeviceContextGL_SetSwapChain(pCtxGL, (struct ISwapChainGL*)NULL);
}

0 comments on commit b54e515

Please sign in to comment.