Skip to content

Commit

Permalink
IDeviceContextGL: renamed PurgeCurrentContextCaches to PurgeCurrentGL…
Browse files Browse the repository at this point in the history
…ContextCaches for consistency
  • Loading branch information
TheMostDiligent committed Oct 20, 2024
1 parent 63559e4 commit 73c010b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ class DeviceContextGLImpl final : public DeviceContextBase<EngineGLImplTraits>
/// Implementation of IDeviceContextGL::UpdateCurrentGLContext().
virtual bool DILIGENT_CALL_TYPE UpdateCurrentGLContext() override final;

/// Implementation of IDeviceContextGL::PurgeCurrentContextCaches().
virtual void DILIGENT_CALL_TYPE PurgeCurrentContextCaches() override final;
/// Implementation of IDeviceContextGL::PurgeCurrentGLContextCaches().
virtual void DILIGENT_CALL_TYPE PurgeCurrentGLContextCaches() override final;

GLContextState& GetContextState() { return m_ContextState; }

Expand Down
10 changes: 5 additions & 5 deletions Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContextGL, IDeviceContext)
/// \return false if there is no active GL context, and true otherwise.
VIRTUAL Bool METHOD(UpdateCurrentGLContext)(THIS) PURE;

/// Purge current context caches (e.g. VAO, FBO).
/// Purges current OpenGL 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(PurgeCurrentGLContextCaches)(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,9 +81,9 @@ DILIGENT_END_INTERFACE

// clang-format off

# 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__)
# define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
# define IDeviceContextGL_PurgeCurrentGLContextCaches(This) CALL_IFACE_METHOD(DeviceContextGL, PurgeCurrentGLContextCaches, This)
# define IDeviceContextGL_SetSwapChain(This, ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)

// clang-format on

Expand Down
2 changes: 1 addition & 1 deletion Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ bool DeviceContextGLImpl::UpdateCurrentGLContext()
return true;
}

void DeviceContextGLImpl::PurgeCurrentContextCaches()
void DeviceContextGLImpl::PurgeCurrentGLContextCaches()
{
auto NativeGLContext = m_pDevice->m_GLContext.GetCurrentNativeGLContext();
if (NativeGLContext != NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ void TestDeviceContextGL_CInterface(IDeviceContextGL* pCtxGL)
{
bool res = IDeviceContextGL_UpdateCurrentGLContext(pCtxGL);
(void)res;
IDeviceContextGL_PurgeCurrentContextCaches(pCtxGL);
IDeviceContextGL_PurgeCurrentGLContextCaches(pCtxGL);
IDeviceContextGL_SetSwapChain(pCtxGL, (struct ISwapChainGL*)NULL);
}

0 comments on commit 73c010b

Please sign in to comment.