Compare commits

..

1 commit

2 changed files with 5 additions and 5 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

@ -1,5 +1,4 @@
#include "window.h"
#include "SDL3/SDL_hints.h"
#include "SDL3/SDL_init.h"
#include "arena_allocator.h"
#include <GL/glew.h>
@ -7,9 +6,6 @@
#include <SDL3/SDL_opengl.h>
wn_window *wn_window_init(Arena *arena) {
// Try to use X11 till I fix glew may require xwayland
SDL_SetHint(SDL_HINT_VIDEO_DRIVER, "x11");
wn_window *window = arena_alloc(arena, sizeof(wn_window));
*window = (wn_window){0};