mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] imgui: use ES 3.0 and remove glew dependency
If we specifically tell ImGui's OpenGL 3.x backend to target OpenGL ES 3.0, then no extension loader is necessary.
This commit is contained in:
@@ -60,7 +60,7 @@ add_library(renderer_EGL STATIC
|
||||
${PROJECT_TOP}/repos/cimgui/imgui/backends/imgui_impl_opengl3.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(renderer_EGL PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1)
|
||||
target_compile_definitions(renderer_EGL PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1 IMGUI_IMPL_OPENGL_ES3)
|
||||
|
||||
target_link_libraries(renderer_EGL
|
||||
${RENDERER_EGL_PKGCONFIG_LIBRARIES}
|
||||
@@ -69,7 +69,6 @@ target_link_libraries(renderer_EGL
|
||||
fonts
|
||||
|
||||
cimgui
|
||||
GLEW
|
||||
)
|
||||
|
||||
target_include_directories(renderer_EGL
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include "util.h"
|
||||
#include "dynamic/fonts.h"
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include "cimgui.h"
|
||||
@@ -925,14 +924,7 @@ bool egl_render_startup(void * opaque)
|
||||
return false;
|
||||
}
|
||||
|
||||
// glew is needed for imgui
|
||||
if (!glewInit())
|
||||
{
|
||||
DEBUG_ERROR("GLEW failed to initialize");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ImGui_ImplOpenGL3_Init("#version 100"))
|
||||
if (!ImGui_ImplOpenGL3_Init("#version 300 es"))
|
||||
{
|
||||
DEBUG_ERROR("Failed to initialize ImGui");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user