diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 15e86bd19..d81313843 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -118,12 +118,11 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") - find_package(GLEW REQUIRED) if (DEFINED USE_OPENGLES) - target_link_libraries(ImGui PUBLIC ${OPENGL_GLESv2_LIBRARY} GLEW::GLEW) + target_link_libraries(ImGui PUBLIC ${OPENGL_GLESv2_LIBRARY}) add_compile_definitions(IMGUI_IMPL_OPENGL_ES3) else() - target_link_libraries(ImGui PUBLIC ${OPENGL_opengl_LIBRARY} GLEW::GLEW) + target_link_libraries(ImGui PUBLIC ${OPENGL_opengl_LIBRARY}) endif() endif() diff --git a/src/graphic/Fast3D/gfx_opengl.cpp b/src/graphic/Fast3D/gfx_opengl.cpp index fba025df6..daea98d71 100644 --- a/src/graphic/Fast3D/gfx_opengl.cpp +++ b/src/graphic/Fast3D/gfx_opengl.cpp @@ -39,9 +39,8 @@ #include #else #include -#include #define GL_GLEXT_PROTOTYPES 1 -// #include +#include #endif #include "gfx_cc.h" @@ -847,7 +846,7 @@ static void gfx_opengl_draw_triangles(float buf_vbo[], size_t buf_vbo_len, size_ } static void gfx_opengl_init(void) { -#if !defined(__SWITCH__) && !defined(USE_OPENGLES) +#if !defined(__SWITCH__) && !defined(__linux__) glewInit(); #endif