OpenGL: Link contexts to device

This commit is contained in:
Lynix
2020-04-19 15:33:36 +02:00
parent bd6924d66d
commit 349e915e10
12 changed files with 78 additions and 21 deletions

View File

@@ -11,6 +11,17 @@ namespace Nz
{
return *m_referenceContext;
}
inline void OpenGLDevice::NotifyTextureDestruction(GLuint texture) const
{
for (const GL::Context* context : m_contexts)
context->NotifyTextureDestruction(texture);
}
inline void OpenGLDevice::NotifyContextDestruction(const GL::Context& context) const
{
m_contexts.erase(&context);
}
}
#include <Nazara/OpenGLRenderer/DebugOff.hpp>