OpenGL: Link contexts to device
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Nz::GL
|
||||
class WGLContext : public Context
|
||||
{
|
||||
public:
|
||||
WGLContext(const WGLLoader& loader);
|
||||
inline WGLContext(const OpenGLDevice* device, const WGLLoader& loader);
|
||||
WGLContext(const WGLContext&) = delete;
|
||||
WGLContext(WGLContext&&) = delete;
|
||||
~WGLContext();
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
|
||||
namespace Nz::GL
|
||||
{
|
||||
inline GL::WGLContext::WGLContext(const OpenGLDevice* device, const WGLLoader& loader) :
|
||||
Context(device),
|
||||
m_loader(loader)
|
||||
{
|
||||
}
|
||||
|
||||
inline bool WGLContext::HasPlatformExtension(const std::string& str) const
|
||||
{
|
||||
return m_supportedPlatformExtensions.find(str) != m_supportedPlatformExtensions.end();
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Nz::GL
|
||||
WGLLoader(DynLib& openglLib);
|
||||
~WGLLoader() = default;
|
||||
|
||||
std::unique_ptr<Context> CreateContext(const ContextParams& params, Context* shareContext) const override;
|
||||
std::unique_ptr<Context> CreateContext(const ContextParams& params, WindowHandle handle, Context* shareContext) const override;
|
||||
std::unique_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, Context* shareContext) const override;
|
||||
std::unique_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, WindowHandle handle, Context* shareContext) const override;
|
||||
|
||||
GLFunction LoadFunction(const char* name) const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user