Added error out if theres and issue with glew which on wayland there is

This commit is contained in:
Warwick 2025-11-28 19:41:49 +00:00
parent e1249ec669
commit dd83815498
2 changed files with 6 additions and 1 deletions

View file

@ -34,10 +34,13 @@ if(USE_VENDORED_LIBRARIES)
set(CGLM_LIBRARIES cglm)
set(CGLM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/cglm/include)
find_package(EGL REQUIRED)
add_definitions(-DEGL)
include(FetchContent)
set(BUILD_UTILS OFF CACHE INTERNAL "")
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
add_definitions(-DGLEW_STATIC)
add_definitions(-DGLEW_STATIC -DGLEW_X11=OFF)
cmake_policy(SET CMP0135 NEW) #DOWNLOAD_EXTRACT_TIMESTAMP
FetchContent_Declare(
glew
@ -94,4 +97,5 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
${CGLM_LIBRARIES}
${GLEW_LIBRARIES}
${OPENGL_LIBRARIES}
${EGL_LIBRARIES}
)

View file

@ -39,6 +39,7 @@ wn_window *wn_window_init(Arena *arena) {
if (glewError != GLEW_OK) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error initializing GLEW! %s",
glewGetErrorString(glewError));
return NULL;
}
if (!SDL_GL_MakeCurrent(window->window, window->glcontext)) {