OpenGL: Link contexts to device
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Context.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/Log.hpp>
|
||||
#include <Nazara/Core/StringExt.hpp>
|
||||
#include <Nazara/OpenGLRenderer/OpenGLDevice.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Loader.hpp>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <Nazara/OpenGLRenderer/Debug.hpp>
|
||||
|
||||
@@ -13,6 +16,12 @@ namespace Nz::GL
|
||||
{
|
||||
thread_local const Context* s_currentContext = nullptr;
|
||||
|
||||
Context::~Context()
|
||||
{
|
||||
if (m_device)
|
||||
m_device->NotifyContextDestruction(*this);
|
||||
}
|
||||
|
||||
|
||||
bool Context::Initialize(const ContextParams& params)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user