mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Platform DRM (#1388)
* updated README.md * fixed CMakeLists.txt to allow building and debugging with Visual Studio Code and CMAKE Tools extension * added PLATFORM_DRM contains mouse pointer code from https://github.com/chriscamacho * removed redundant cleanup in InitGraphicsDevice * fixed DRM connector mode selection * added choosen DRM connected mode to log output * added respecting TargetFPS on DRM mode selection, default to 60 * added support for GetMonitorRefreshRate * changed SUPPORT_MOUSE_CURSOR_RPI to SUPPORT_MOUSE_CURSOR_NATIVE * changed avoidProgressive to allowInterlaced * cleanup, function extraction and improved mode selection * README reverted to original for PR * line endings fixed for core.c * removed old code * mouse pointer reverted to small square * replaced SetGraphicDeviceName() by DEFAULT_GRAPHIC_DEVICE_DRM Co-authored-by: kernelkinetic <kernelkinetic@outlook.com>
This commit is contained in:
@ -127,6 +127,22 @@ elseif(${PLATFORM} MATCHES "Raspberry Pi")
|
||||
link_directories(/opt/vc/lib)
|
||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
|
||||
|
||||
elseif(${PLATFORM} MATCHES "DRM")
|
||||
set(PLATFORM_CPP "PLATFORM_DRM")
|
||||
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
|
||||
|
||||
add_definitions(-D_DEFAULT_SOURCE)
|
||||
add_definitions(-DEGL_NO_X11)
|
||||
add_definitions(-DPLATFORM_DRM)
|
||||
|
||||
find_library(GLESV2 GLESv2)
|
||||
find_library(EGL EGL)
|
||||
find_library(DRM drm)
|
||||
find_library(GBM gbm)
|
||||
|
||||
include_directories(/usr/include/libdrm)
|
||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} pthread m dl)
|
||||
|
||||
endif()
|
||||
|
||||
if (${OPENGL_VERSION})
|
||||
@ -164,7 +180,13 @@ if(STATIC)
|
||||
|
||||
target_compile_definitions(raylib_static
|
||||
PUBLIC ${PLATFORM_CPP}
|
||||
PUBLIC PLATFORM=${PLATFORM_CPP}
|
||||
PUBLIC ${GRAPHICS}
|
||||
PUBLIC GRAPHICS=${GRAPHICS}
|
||||
)
|
||||
|
||||
target_link_libraries(raylib_static
|
||||
PUBLIC ${LIBS_PRIVATE}
|
||||
)
|
||||
|
||||
set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${GLFW_PKG_LIBS})
|
||||
|
||||
Reference in New Issue
Block a user