refactor Windows classes to separate EGL/WGL/Backing Window

This commit is contained in:
Nick Fisher
2023-10-25 13:11:58 +11:00
parent c4245b0dd3
commit 8cea106b30
18 changed files with 972 additions and 996 deletions

View File

@@ -17,11 +17,9 @@ OpenGLTextureBuffer::OpenGLTextureBuffer(
flutter::PluginRegistrarWindows *pluginRegistrar,
flutter::TextureRegistrar *textureRegistrar,
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result,
uint32_t width, uint32_t height, HGLRC context,
std::shared_ptr<std::mutex> renderMutex)
uint32_t width, uint32_t height, HGLRC context)
: _pluginRegistrar(pluginRegistrar), _textureRegistrar(textureRegistrar),
_width(width), _height(height), _context(context),
_renderMutex(renderMutex) {
_width(width), _height(height), _context(context) {
HWND hwnd = _pluginRegistrar->GetView()->GetNativeWindow();
@@ -135,7 +133,7 @@ OpenGLTextureBuffer::~OpenGLTextureBuffer() {
// result->Error("CONTEXT", "Failed to switch OpenGL context.", nullptr);
return;
}
glDeleteTextures(1, &this->_inactive->glTextureId);
glDeleteTextures(1, &this->glTextureId);
wglMakeCurrent(NULL, NULL);
}