fix egl extensions loader

This commit is contained in:
2025-12-30 09:58:43 +01:00
parent 66df0e66e2
commit 2ee6543d51
2 changed files with 7 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ bool egl::Context::create(ANativeWindow* window)
Logger::Log("eglInitialize failed");
return false;
}
version = gladLoaderLoadEGL(EGL_DEFAULT_DISPLAY);
version = gladLoadEGL(m_display, eglGetProcAddress);
std::vector<EGLint> config_attribs =
{
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
@@ -86,6 +86,7 @@ bool egl::Context::create(ANativeWindow* window)
{
glDebugMessageCallback(debug_handler, nullptr);
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
return true;
}

View File

@@ -132,10 +132,14 @@ class Kernel
}
m_render_target->bind();
m_listener->onServiceInitialized(true);
while (true)
{
glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glFinish();
m_listener->onFrameAvailable(m_render_target->hardware_buffer());
m_egl_context->swap();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
public: