Skip to content

Commit

Permalink
Multi monitor support
Browse files Browse the repository at this point in the history
* move to OpenGL
* move crop to shader
* add DirectX 11 support
* add GPU selection
* fix TileBox positions
  • Loading branch information
karwler committed Jan 4, 2023
1 parent be68cb7 commit 090fb62
Show file tree
Hide file tree
Showing 27 changed files with 2,894 additions and 726 deletions.
21 changes: 16 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ option(DOWNLOADER "Build with downloader. (currently mostly broken)" OFF)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
option(NATIVE "Build for the current CPU." OFF)
endif()
if(UNIX)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
option(DIRECTX "Build with DirectX 11 support." ON)
elseif(UNIX)
option(OPENGLES "Build for OpenGL ES 3.0 instead of OpenGL 3.0." OFF)
option(APPIMAGE "Package as an AppImage." OFF)
endif()

Expand All @@ -25,6 +28,8 @@ set(SRC_FILES
"src/engine/fileSys.h"
"src/engine/inputSys.cpp"
"src/engine/inputSys.h"
"src/engine/renderer.cpp"
"src/engine/renderer.h"
"src/engine/scene.cpp"
"src/engine/scene.h"
"src/engine/windowSys.cpp"
Expand Down Expand Up @@ -55,9 +60,9 @@ endif()

# dependencies
set(VER_ARC "3.6.1")
set(VER_SDL "2.0.22")
set(VER_IMG "2.6.0")
set(VER_TTF "2.20.0")
set(VER_SDL "2.26.1")
set(VER_IMG "2.6.2")
set(VER_TTF "2.20.1")
set(VER_GLM "0.9.9.8")
set(VER_CURL "7.83.1")
set(VER_LXML "2.9.14")
Expand Down Expand Up @@ -225,11 +230,15 @@ else()
endif()
set(ICONS_DIR "${DATA_DIR}/icons")
set(LICN_DIR "${DATA_DIR}/licenses")

include_directories($<$<BOOL:${DOWNLOADER}>:/usr/include/libxml2>)
endif()

# compiler flags
add_compile_definitions($<$<BOOL:${DOWNLOADER}>:DOWNLOADER> "$<$<BOOL:${WIN32}>:UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;NOMINMAX;$<$<NOT:$<BOOL:${MSVC}>>:_WIN32_WINNT=0x600>>")
add_compile_definitions($<$<BOOL:${DOWNLOADER}>:DOWNLOADER>
$<$<BOOL:${DIRECTX}>:WITH_DIRECTX>
$<$<BOOL:${OPENGLES}>:OPENGLES>
"$<$<BOOL:${WIN32}>:UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;NOMINMAX;$<$<NOT:$<BOOL:${MSVC}>>:_WIN32_WINNT=0x600>>")

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -pedantic-errors -Wformat=2 -Wmissing-declarations -Wold-style-cast -Wshadow -Wunreachable-code -Wno-implicit-fallthrough -Wno-old-style-cast -Wno-switch $<$<NOT:$<BOOL:${MINGW}>>:-Wdouble-promotion>)
Expand All @@ -253,6 +262,8 @@ endif()
add_executable(${PROJECT_NAME} WIN32 ${SRC_FILES})
target_link_libraries(${PROJECT_NAME} SDL2 SDL2_image SDL2_ttf archive
"$<$<BOOL:${UNIX}>:pthread;dl>"
"$<IF:$<BOOL:${WIN32}>,opengl32,$<IF:$<BOOL:${OPENGLES}>,GLESv2,GL>>"
"$<$<BOOL:${DIRECTX}>:d3d11.lib;d3dcompiler.lib;dxgi.lib>"
"$<$<BOOL:${DOWNLOADER}>:$<IF:$<BOOL:${WIN32}>,libcurl;libxml2,curl;xml2>>")

set_target_properties(${PROJECT_NAME} PROPERTIES
Expand Down
96 changes: 48 additions & 48 deletions rsc/themes.ini
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
[Gray]
background=10 10 10 255
normal=90 90 90 255
dark=60 60 60 255
light=120 120 120 255
select=105 105 105 255
tooltip=75 75 75 255
text=210 210 210 255
texture=210 210 210 255
background=0.04 0.04 0.04 1
normal=0.35 0.35 0.35 1
dark=0.24 0.24 0.24 1
light=0.47 0.47 0.47 1
select=0.41 0.41 0.41 1
tooltip=0.29 0.29 0.29 1
text=0.82 0.82 0.82 1
texture=0.82 0.82 0.82 1

[Brown]
background=17 8 2 255
normal=102 91 79 255
dark=69 62 53 255
light=127 114 98 255
select=119 106 91 255
tooltip=80 70 60 255
text=220 220 220 255
texture=220 220 220 255
background=0.07 0.03 0.01 1
normal=0.4 0.36 0.31 1
dark=0.27 0.24 0.21 1
light=0.5 0.45 0.38 1
select=0.47 0.42 0.36 1
tooltip=0.31 0.27 0.24 1
text=0.86 0.86 0.86 1
texture=0.86 0.86 0.86 1

[White]
background=250 250 250 255
normal=210 210 210 255
dark=180 180 180 255
light=230 230 230 255
select=220 220 220 255
tooltip=190 190 190 255
text=60 60 60 255
texture=60 60 60 255
background=0.98 0.98 0.98 1
normal=0.82 0.82 0.82 1
dark=0.71 0.71 0.71 1
light=0.9 0.9 0.9 1
select=0.86 0.86 0.86 1
tooltip=0.75 0.75 0.75 1
text=0.24 0.24 0.24 1
texture=0.24 0.24 0.24 1

[Starlight]
background=80 30 111 255
normal=127 47 172 255
dark=98 38 136 255
light=159 242 217 255
select=238 190 243 255
tooltip=106 94 180 255
text=255 255 255 255
texture=255 255 255 255
background=0.31 0.12 0.44 1
normal=0.5 0.18 0.67 1
dark=0.38 0.15 0.53 1
light=0.62 0.95 0.85 1
select=0.93 0.75 0.95 1
tooltip=0.42 0.37 0.71 1
text=1 1 1 1
texture=1 1 1 1

[Gay]
background=176 48 96 255
normal=255 105 180 255
dark=255 20 147 255
light=255 182 193 255
select=238 130 238 255
tooltip=255 60 160 255
text=255 255 255 255
texture=255 255 255 255
background=0.69 0.19 0.38 1
normal=1 0.41 0.71 1
dark=1 0.08 0.58 1
light=1 0.71 0.76 1
select=0.93 0.51 0.93 1
tooltip=1 0.24 0.63 1
text=1 1 1 1
texture=1 1 1 1

[Oh Shit]
background=255 255 255 255
normal=255 255 255 255
dark=255 255 255 255
light=255 255 255 255
select=255 255 255 255
tooltip=255 255 255 255
text=255 255 255 255
texture=255 255 255 255
background=1 1 1 1
normal=1 1 1 1
dark=1 1 1 1
light=1 1 1 1
select=1 1 1 1
tooltip=1 1 1 1
text=1 1 1 1
texture=1 1 1 1
Loading

0 comments on commit 090fb62

Please sign in to comment.