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

28
windows/egl_context.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef _EGL_CONTEXT_H
#define _EGL_CONTEXT_H
#include "flutter_angle_texture.h"
#include "backend/platforms/PlatformEGL.h"
namespace polyvox_filament {
class EGLContext : public FlutterRenderingContext {
public:
EGLContext(flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar);
void CreateTexture(
uint32_t width, uint32_t height,
std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);
private:
EGLContext _context = NULL;
EGLConfig _eglConfig = NULL;
EGLDisplay _eglDisplay = NULL;
std::unique_ptr<FlutterAngleTexture> _active = nullptr;
std::unique_ptr<FlutterAngleTexture> _inactive = nullptr;
ID3D11Device* _D3D11Device = nullptr;
ID3D11DeviceContext* _D3D11DeviceContext = nullptr;
filament::backend::Platform* _platform = nullptr;
}
}
#endif