OpenGLRenderer: Use a single context with WebGL
This commit is contained in:
committed by
Jérôme Leclercq
parent
ea5c5240fc
commit
5b3703347f
@@ -65,9 +65,7 @@ namespace Nz::GL
|
||||
Fallback fallbacks; //< m_ omitted
|
||||
|
||||
std::unordered_set<std::string> m_supportedPlatformExtensions;
|
||||
static EMSCRIPTEN_WEBGL_CONTEXT_HANDLE s_handle;
|
||||
static size_t s_handleCounter;
|
||||
bool m_ownsDisplay;
|
||||
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE m_handle;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ namespace Nz::GL
|
||||
inline WebContext::WebContext(const OpenGLDevice* device, const WebLoader& loader) :
|
||||
Context(device),
|
||||
m_loader(loader),
|
||||
//m_handle(0),
|
||||
m_ownsDisplay(false)
|
||||
m_handle(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace Nz::GL
|
||||
friend SymbolLoader;
|
||||
|
||||
public:
|
||||
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;
|
||||
std::shared_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, Context* shareContext) const override;
|
||||
std::shared_ptr<Context> CreateContext(const OpenGLDevice* device, const ContextParams& params, WindowHandle handle, Context* shareContext) const override;
|
||||
|
||||
ContextType GetPreferredContextType() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user