From 96795f33f0daf75b896d4263c7f54a4fb5f1705f Mon Sep 17 00:00:00 2001 From: Vitaliy Zarubin Date: Thu, 19 Oct 2023 16:46:28 +0300 Subject: [PATCH] [example] Clear aurora plugin --- .../ru.auroraos.flutter_example_packages.spec | 1 - .../aurora/embedder_texture_plugin.cpp | 42 ++----------------- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/example/aurora/rpm/ru.auroraos.flutter_example_packages.spec b/example/aurora/rpm/ru.auroraos.flutter_example_packages.spec index 5864c1d..2c965f8 100644 --- a/example/aurora/rpm/ru.auroraos.flutter_example_packages.spec +++ b/example/aurora/rpm/ru.auroraos.flutter_example_packages.spec @@ -10,7 +10,6 @@ Source0: %{name}-%{version}.tar.zst BuildRequires: cmake BuildRequires: pkgconfig(sqlite3) -BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(flutter-embedder) %description diff --git a/packages/embedder_texture/aurora/embedder_texture_plugin.cpp b/packages/embedder_texture/aurora/embedder_texture_plugin.cpp index 30b42b2..ed771a1 100644 --- a/packages/embedder_texture/aurora/embedder_texture_plugin.cpp +++ b/packages/embedder_texture/aurora/embedder_texture_plugin.cpp @@ -5,10 +5,6 @@ #include #include #include -#include - -#include -#include void EmbedderTexturePlugin::RegisterWithRegistrar(PluginRegistrar ®istrar) { @@ -36,42 +32,10 @@ void EmbedderTexturePlugin::onMethodCall(const MethodCall &call) void EmbedderTexturePlugin::onCreate(const MethodCall &call) { - auto width = call.GetArgument("width"); - auto height = call.GetArgument("height"); - - static GLfloat pixels[] = - { - 1, 0, 0, - 0, 1, 0, - 0, 0, 1, - 1, 1, 1 - }; - - glEnable(GL_TEXTURE_2D); - - GLuint texture_id; - glGenTextures(1, &texture_id); - - glBindTexture(GL_TEXTURE_2D, texture_id); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0, GL_RGB, GL_FLOAT, pixels); - - std::cout << "--------------------" << std::endl; - std::cout << glGetError() << std::endl; - std::cout << texture_id << std::endl; - std::cout << width << std::endl; - std::cout << height << std::endl; - std::cout << "++++++++++++++++++++" << std::endl; - - if (texture_id != 0) { - call.TextureRegister(texture_id); - } +// auto width = call.GetArgument("width"); +// auto height = call.GetArgument("height"); - call.SendSuccessResponse(texture_id); + call.SendSuccessResponse(call.TextureRegister()); } void EmbedderTexturePlugin::onRemove(const MethodCall &call)