@@ -58,14 +58,15 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContextGL, IDeviceContext)
5858 /// other command to let the engine update active context every time when control flow
5959 /// is passed over from the main application.
6060 ///
61- /// \param[in] PurgeCaches - Whether to purge context caches (e.g. VAO, FBO) before
62- /// updating the active context. An application should set this
63- /// flag to true if the last active context will not be used anymore
64- /// (e.g. it was destroyed) to avoid memory leaks.
65- ///
6661 /// \return false if there is no active GL context, and true otherwise.
67- VIRTUAL bool METHOD (UpdateCurrentGLContext )(THIS_
68- bool PurgeCaches DEFAULT_INITIALIZER (false )) PURE ;
62+ VIRTUAL Bool METHOD (UpdateCurrentGLContext )(THIS ) PURE ;
63+
64+ /// Purge current context caches (e.g. VAO, FBO).
65+
66+ /// If an application uses multiple GL contexts, this method must be called
67+ /// before the current context is about to be released,
68+ /// to let the engine cleanup internal OpenGL object caches.
69+ VIRTUAL void METHOD (PurgeCurrentContextCaches )(THIS ) PURE ;
6970
7071 /// Sets the swap in the device context. The swap chain is used by the device context
7172 /// to obtain the default FBO handle.
@@ -80,8 +81,9 @@ DILIGENT_END_INTERFACE
8081
8182// clang-format off
8283
83- # define IDeviceContextGL_UpdateCurrentGLContext (This , ...) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This, __VA_ARGS__)
84- # define IDeviceContextGL_SetSwapChain (This , ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)
84+ # define IDeviceContextGL_UpdateCurrentGLContext (This ) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
85+ # define IDeviceContextGL_PurgeCurrentContextCaches (This ) CALL_IFACE_METHOD(DeviceContextGL, PurgeCurrentContextCaches, This)
86+ # define IDeviceContextGL_SetSwapChain (This , ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)
8587
8688// clang-format on
8789
0 commit comments