Compare commits
1 commit
8fe8fbb493
...
dd83815498
| Author | SHA1 | Date | |
|---|---|---|---|
| dd83815498 |
2 changed files with 5 additions and 5 deletions
|
|
@ -34,10 +34,13 @@ if(USE_VENDORED_LIBRARIES)
|
||||||
set(CGLM_LIBRARIES cglm)
|
set(CGLM_LIBRARIES cglm)
|
||||||
set(CGLM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/cglm/include)
|
set(CGLM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/cglm/include)
|
||||||
|
|
||||||
|
find_package(EGL REQUIRED)
|
||||||
|
add_definitions(-DEGL)
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
set(BUILD_UTILS OFF CACHE INTERNAL "")
|
set(BUILD_UTILS OFF CACHE INTERNAL "")
|
||||||
set(BUILD_SHARED_LIBS 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
|
cmake_policy(SET CMP0135 NEW) #DOWNLOAD_EXTRACT_TIMESTAMP
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glew
|
glew
|
||||||
|
|
@ -94,4 +97,5 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
${CGLM_LIBRARIES}
|
${CGLM_LIBRARIES}
|
||||||
${GLEW_LIBRARIES}
|
${GLEW_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
${EGL_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "SDL3/SDL_hints.h"
|
|
||||||
#include "SDL3/SDL_init.h"
|
#include "SDL3/SDL_init.h"
|
||||||
#include "arena_allocator.h"
|
#include "arena_allocator.h"
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
@ -7,9 +6,6 @@
|
||||||
#include <SDL3/SDL_opengl.h>
|
#include <SDL3/SDL_opengl.h>
|
||||||
|
|
||||||
wn_window *wn_window_init(Arena *arena) {
|
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));
|
wn_window *window = arena_alloc(arena, sizeof(wn_window));
|
||||||
*window = (wn_window){0};
|
*window = (wn_window){0};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue