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

@@ -16,25 +16,24 @@
#include <Windows.h>
#include <wrl.h>
#include "flutter_texture_buffer.h"
typedef uint32_t GLuint;
namespace polyvox_filament {
class OpenGLTextureBuffer {
class OpenGLTextureBuffer : public FlutterTextureBuffer {
public:
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);
HGLRC context);
~OpenGLTextureBuffer();
GLuint glTextureId = 0;
int64_t flutterTextureId = 0;
std::unique_ptr<FlutterDesktopPixelBuffer> pixelBuffer;
std::unique_ptr<uint8_t> pixelData;
std::unique_ptr<flutter::TextureVariant> texture;
@@ -46,7 +45,6 @@ class OpenGLTextureBuffer {
uint32_t _height = 0;
HGLRC _context = NULL;
bool logged = false;
std::shared_ptr<std::mutex> _renderMutex;
};
}