Compare commits
2 commits
dd83815498
...
8fe8fbb493
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fe8fbb493 | |||
| 9842fee816 |
2 changed files with 5 additions and 5 deletions
|
|
@ -34,13 +34,10 @@ 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 -DGLEW_X11=OFF)
|
add_definitions(-DGLEW_STATIC)
|
||||||
cmake_policy(SET CMP0135 NEW) #DOWNLOAD_EXTRACT_TIMESTAMP
|
cmake_policy(SET CMP0135 NEW) #DOWNLOAD_EXTRACT_TIMESTAMP
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glew
|
glew
|
||||||
|
|
@ -97,5 +94,4 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
${CGLM_LIBRARIES}
|
${CGLM_LIBRARIES}
|
||||||
${GLEW_LIBRARIES}
|
${GLEW_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${EGL_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#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>
|
||||||
|
|
@ -6,6 +7,9 @@
|
||||||
#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