fix egl extensions loader
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user