mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] egl: properly use OpenGL ES
Instead of using the desktop <GL/gl.h>, we properly use the OpenGL ES 3.x headers. Also, we now use GL_EXT_buffer_storage for MAP_PERSISTENT_BIT_EXT and MAP_COHERENT_BIT_EXT as the core versions are only available in desktop OpenGL 4.4. Similarly, we need GL_EXT_texture_format_BGRA8888 for GL_BGRA_EXT as GL_BGRA is desktop-only.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "dynamic/fonts.h"
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES3/gl32.h>
|
||||
|
||||
#include "cimgui.h"
|
||||
#include "generator/output/cimgui_impl.h"
|
||||
@@ -827,6 +828,18 @@ bool egl_render_startup(void * opaque)
|
||||
glGetIntegerv(GL_MAJOR_VERSION, &esMaj);
|
||||
glGetIntegerv(GL_MINOR_VERSION, &esMin);
|
||||
|
||||
if (!util_hasGLExt(gl_exts, "GL_EXT_buffer_storage"))
|
||||
{
|
||||
DEBUG_ERROR("GL_EXT_buffer_storage is needed to use EGL backend");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!util_hasGLExt(gl_exts, "GL_EXT_texture_format_BGRA8888"))
|
||||
{
|
||||
DEBUG_ERROR("GL_EXT_texture_format_BGRA8888 is needed to use EGL backend");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (g_egl_dynProcs.glEGLImageTargetTexture2DOES)
|
||||
{
|
||||
if (util_hasGLExt(client_exts, "EGL_EXT_image_dma_buf_import"))
|
||||
|
Reference in New Issue
Block a user