diff --git a/CMakeLists.txt b/CMakeLists.txt index 61ed4ac..8613a85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,9 +147,9 @@ set(SOURCES src/mainwindow.cpp src/customwidget.cpp src/screenlockdetector.cpp - src/screenlockdetector_base.cpp + src/platform/screenlockdetector_base.cpp src/powermonitor.cpp - src/powermonitor_base.cpp + src/platform/powermonitor_base.cpp ) set(HEADERS @@ -157,9 +157,9 @@ set(HEADERS src/renderwidgetbase.h src/customwidget.h src/screenlockdetector.h - src/screenlockdetector_base.h + src/platform/screenlockdetector_base.h src/powermonitor.h - src/powermonitor_base.h + src/platform/powermonitor_base.h ) # Add Vulkan widget if Vulkan is available @@ -179,33 +179,33 @@ endif() if(APPLE) # macOS specific files list(APPEND SOURCES - src/screenlockdetector_macos.mm - src/powermonitor_macos.mm - src/vulkanwidget_macos.mm + src/platform/screenlockdetector_macos.mm + src/platform/powermonitor_macos.mm + src/platform/vulkanwidget_macos.mm ) list(APPEND HEADERS - src/screenlockdetector_macos.h - src/powermonitor_macos.h - src/vulkanwidget_macos.h + src/platform/screenlockdetector_macos.h + src/platform/powermonitor_macos.h + src/platform/vulkanwidget_macos.h ) # Enable Objective-C++ for .mm files set_source_files_properties( - src/screenlockdetector_macos.mm - src/powermonitor_macos.mm - src/vulkanwidget_macos.mm + src/platform/screenlockdetector_macos.mm + src/platform/powermonitor_macos.mm + src/platform/vulkanwidget_macos.mm PROPERTIES COMPILE_FLAGS "-x objective-c++" ) elseif(UNIX) # Linux specific files list(APPEND SOURCES - src/screenlockdetector_linux.cpp - src/powermonitor_linux.cpp + src/platform/screenlockdetector_linux.cpp + src/platform/powermonitor_linux.cpp ) list(APPEND HEADERS - src/screenlockdetector_linux.h - src/powermonitor_linux.h + src/platform/screenlockdetector_linux.h + src/platform/powermonitor_linux.h ) endif() diff --git a/compile_shaders_mac.sh b/compile_shaders_mac.sh new file mode 100755 index 0000000..cd6ffd4 --- /dev/null +++ b/compile_shaders_mac.sh @@ -0,0 +1,174 @@ +#!/bin/bash + +# Shader compilation script for Vulkan +# Sets up environment and compiles GLSL shaders to SPIR-V + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SHADERS_DIR="$SCRIPT_DIR/shaders" +OUTPUT_DIR="$SCRIPT_DIR/src/shaders_spirv" + +# Find glslang compiler +GLSLANG="" + +# Check custom paths first +if [ -x "$HOME/VulkanSDK/1.4.328.1/macOS/bin/glslang" ]; then + GLSLANG="$HOME/VulkanSDK/1.4.328.1/macOS/bin/glslang" + echo "Found glslang at: $GLSLANG" +elif [ -x "$HOME/VulkanSDK/1.4.328.1/macOS/bin/glslangValidator" ]; then + GLSLANG="$HOME/VulkanSDK/1.4.328.1/macOS/bin/glslangValidator" + echo "Found glslangValidator at: $GLSLANG" +elif command -v glslc &> /dev/null; then + GLSLANG="glslc" + echo "Using system glslc" +elif command -v glslangValidator &> /dev/null; then + GLSLANG="glslangValidator" + echo "Using system glslangValidator" +elif command -v glslang &> /dev/null; then + GLSLANG="glslang" + echo "Using system glslang" +else + echo "ERROR: No GLSL compiler found!" + echo "Please install:" + echo " - Vulkan SDK (provides glslc)" + echo " - or glslang to ~/VulkanSDK/1.4.328.1/macOS/bin/" + exit 1 +fi + +# Create output directory +mkdir -p "$OUTPUT_DIR" + +# Compilation function +compile_shader() { + local shader_file="$1" + local output_name="$2" + local spirv_file="$OUTPUT_DIR/${shader_file}.spv" + local inc_file="$OUTPUT_DIR/${output_name}" + + echo "Compiling $shader_file..." + + # Determine compiler command + if [[ "$GLSLANG" == *"glslc"* ]]; then + "$GLSLANG" "$SHADERS_DIR/$shader_file" -o "$spirv_file" + else + "$GLSLANG" -V "$SHADERS_DIR/$shader_file" -o "$spirv_file" + fi + + if [ $? -ne 0 ]; then + echo " FAILED to compile $shader_file" + return 1 + fi + + echo " SUCCESS - Generated $spirv_file" + + # Generate C++ include file + echo " Generating $inc_file..." + generate_include "$spirv_file" "$inc_file" + + return 0 +} + +# Generate C++ include file from SPIR-V +generate_include() { + local spirv_file="$1" + local inc_file="$2" + + # Use Python if available for better formatting + if command -v python3 &> /dev/null; then + python3 -c " +import struct +import sys + +with open('$spirv_file', 'rb') as f: + data = f.read() + +num_words = len(data) // 4 +words = struct.unpack('<{}I'.format(num_words), data[:num_words*4]) + +print('// Auto-generated from $(basename $spirv_file)') +print('// Size: {} bytes ({} words)'.format(len(data), num_words)) + +for i in range(0, num_words, 8): + chunk = words[i:i+8] + if i == 0: + sys.stdout.write(' ') + else: + sys.stdout.write(',\n ') + sys.stdout.write(', '.join('0x{:08x}u'.format(w) for w in chunk)) +print() +" > "$inc_file" + else + # Fallback: simple hexdump + echo "// Auto-generated from $(basename $spirv_file)" > "$inc_file" + xxd -i < "$spirv_file" | sed 's/unsigned char/uint32_t/' >> "$inc_file" + fi + + echo " Generated $inc_file" +} + +echo "========================================" +echo "Compiling Vulkan Shaders" +echo "========================================" +echo "Shaders directory: $SHADERS_DIR" +echo "Output directory: $OUTPUT_DIR" +echo "Compiler: $GLSLANG" +echo "========================================" +echo "" + +# Compile all shaders +SUCCESS=0 +FAILED=0 + +# Background shaders +if compile_shader "background.vert" "background_vert.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +if compile_shader "background.frag" "background_frag.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +# Geometry shaders +if compile_shader "geometry.vert" "geometry_vert.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +if compile_shader "geometry.frag" "geometry_frag.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +# Text shaders +if compile_shader "text.vert" "text_vert.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +if compile_shader "text.frag" "text_frag.inc"; then + ((SUCCESS++)) +else + ((FAILED++)) +fi + +echo "" +echo "========================================" +echo "Compilation Summary" +echo "========================================" +echo "Success: $SUCCESS" +echo "Failed: $FAILED" +echo "========================================" + +if [ $FAILED -gt 0 ]; then + exit 1 +fi + +echo "" +echo "All shaders compiled successfully!" +exit 0 diff --git a/src/powermonitor_base.cpp b/src/platform/powermonitor_base.cpp similarity index 100% rename from src/powermonitor_base.cpp rename to src/platform/powermonitor_base.cpp diff --git a/src/powermonitor_base.h b/src/platform/powermonitor_base.h similarity index 100% rename from src/powermonitor_base.h rename to src/platform/powermonitor_base.h diff --git a/src/powermonitor_linux.cpp b/src/platform/powermonitor_linux.cpp similarity index 100% rename from src/powermonitor_linux.cpp rename to src/platform/powermonitor_linux.cpp diff --git a/src/powermonitor_linux.h b/src/platform/powermonitor_linux.h similarity index 100% rename from src/powermonitor_linux.h rename to src/platform/powermonitor_linux.h diff --git a/src/powermonitor_macos.h b/src/platform/powermonitor_macos.h similarity index 100% rename from src/powermonitor_macos.h rename to src/platform/powermonitor_macos.h diff --git a/src/powermonitor_macos.mm b/src/platform/powermonitor_macos.mm similarity index 100% rename from src/powermonitor_macos.mm rename to src/platform/powermonitor_macos.mm diff --git a/src/screenlockdetector_base.cpp b/src/platform/screenlockdetector_base.cpp similarity index 100% rename from src/screenlockdetector_base.cpp rename to src/platform/screenlockdetector_base.cpp diff --git a/src/screenlockdetector_base.h b/src/platform/screenlockdetector_base.h similarity index 100% rename from src/screenlockdetector_base.h rename to src/platform/screenlockdetector_base.h diff --git a/src/screenlockdetector_linux.cpp b/src/platform/screenlockdetector_linux.cpp similarity index 100% rename from src/screenlockdetector_linux.cpp rename to src/platform/screenlockdetector_linux.cpp diff --git a/src/screenlockdetector_linux.h b/src/platform/screenlockdetector_linux.h similarity index 100% rename from src/screenlockdetector_linux.h rename to src/platform/screenlockdetector_linux.h diff --git a/src/screenlockdetector_macos.h b/src/platform/screenlockdetector_macos.h similarity index 100% rename from src/screenlockdetector_macos.h rename to src/platform/screenlockdetector_macos.h diff --git a/src/screenlockdetector_macos.mm b/src/platform/screenlockdetector_macos.mm similarity index 100% rename from src/screenlockdetector_macos.mm rename to src/platform/screenlockdetector_macos.mm diff --git a/src/vulkanwidget_macos.h b/src/platform/vulkanwidget_macos.h similarity index 100% rename from src/vulkanwidget_macos.h rename to src/platform/vulkanwidget_macos.h diff --git a/src/vulkanwidget_macos.mm b/src/platform/vulkanwidget_macos.mm similarity index 100% rename from src/vulkanwidget_macos.mm rename to src/platform/vulkanwidget_macos.mm diff --git a/src/powermonitor.cpp b/src/powermonitor.cpp index 55c17be..44f62a5 100644 --- a/src/powermonitor.cpp +++ b/src/powermonitor.cpp @@ -1,9 +1,9 @@ #include "powermonitor.h" #ifdef Q_OS_LINUX -#include "powermonitor_linux.h" +#include "platform/powermonitor_linux.h" #elif defined(Q_OS_MAC) -#include "powermonitor_macos.h" +#include "platform/powermonitor_macos.h" #endif #include diff --git a/src/powermonitor.h b/src/powermonitor.h index b6afad5..79f414a 100644 --- a/src/powermonitor.h +++ b/src/powermonitor.h @@ -1,7 +1,7 @@ #ifndef POWERMONITOR_H #define POWERMONITOR_H -#include "powermonitor_base.h" +#include "platform/powermonitor_base.h" /** * @brief 跨平台电源监视器工厂类 diff --git a/src/screenlockdetector.cpp b/src/screenlockdetector.cpp index 3aa8eff..6ca4dc6 100644 --- a/src/screenlockdetector.cpp +++ b/src/screenlockdetector.cpp @@ -1,11 +1,11 @@ #include "screenlockdetector.h" #ifdef Q_OS_LINUX -#include "screenlockdetector_linux.h" +#include "platform/screenlockdetector_linux.h" #endif #ifdef Q_OS_MAC -#include "screenlockdetector_macos.h" +#include "platform/screenlockdetector_macos.h" #endif #include diff --git a/src/screenlockdetector.h b/src/screenlockdetector.h index 9328020..1076a80 100644 --- a/src/screenlockdetector.h +++ b/src/screenlockdetector.h @@ -1,7 +1,7 @@ #ifndef SCREENLOCKDETECTOR_H #define SCREENLOCKDETECTOR_H -#include "screenlockdetector_base.h" +#include "platform/screenlockdetector_base.h" /** * @brief 跨平台屏幕锁定检测器工厂类 diff --git a/src/shaders_spirv/background.frag.spv b/src/shaders_spirv/background.frag.spv index a5ad5d4..dd50096 100644 Binary files a/src/shaders_spirv/background.frag.spv and b/src/shaders_spirv/background.frag.spv differ diff --git a/src/shaders_spirv/background.vert.spv b/src/shaders_spirv/background.vert.spv index dbdb8e3..419cc68 100644 Binary files a/src/shaders_spirv/background.vert.spv and b/src/shaders_spirv/background.vert.spv differ diff --git a/src/shaders_spirv/background_frag.inc b/src/shaders_spirv/background_frag.inc index 075ff45..6f2bf3b 100644 --- a/src/shaders_spirv/background_frag.inc +++ b/src/shaders_spirv/background_frag.inc @@ -17,13 +17,13 @@ 0x00000049u, 0x6f6c6f63u, 0x00003172u, 0x00040005u, 0x0000004eu, 0x6f6c6f63u, 0x00003272u, 0x00050005u, 0x00000052u, 0x64617267u, 0x746e6569u, 0x00000000u, 0x00050005u, 0x0000005du, 0x616e6966u, 0x6c6f436cu, 0x0000726fu, 0x00050005u, 0x00000069u, 0x67617266u, 0x6f6c6f43u, 0x00000072u, 0x00060005u, 0x0000006au, - 0x67617266u, 0x43786554u, 0x64726f6fu, 0x00000000u, 0x00050048u, 0x00000007u, 0x00000000u, 0x00000023u, - 0x00000000u, 0x00050048u, 0x00000007u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000007u, - 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000007u, 0x00000003u, 0x00000023u, 0x0000000cu, - 0x00050048u, 0x00000007u, 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000007u, 0x00000005u, - 0x00000023u, 0x00000014u, 0x00050048u, 0x00000007u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00030047u, - 0x00000007u, 0x00000002u, 0x00040047u, 0x00000009u, 0x00000022u, 0x00000000u, 0x00040047u, 0x00000009u, - 0x00000021u, 0x00000000u, 0x00040047u, 0x00000016u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001fu, + 0x67617266u, 0x43786554u, 0x64726f6fu, 0x00000000u, 0x00030047u, 0x00000007u, 0x00000002u, 0x00050048u, + 0x00000007u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000007u, 0x00000001u, 0x00000023u, + 0x00000004u, 0x00050048u, 0x00000007u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000007u, + 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000007u, 0x00000004u, 0x00000023u, 0x00000010u, + 0x00050048u, 0x00000007u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000007u, 0x00000006u, + 0x00000023u, 0x00000018u, 0x00040047u, 0x00000009u, 0x00000021u, 0x00000000u, 0x00040047u, 0x00000009u, + 0x00000022u, 0x00000000u, 0x00040047u, 0x00000016u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001fu, 0x0000001eu, 0x00000002u, 0x00040047u, 0x00000069u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000006au, 0x0000001eu, 0x00000001u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x0009001eu, 0x00000007u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, diff --git a/src/shaders_spirv/background_vert.inc b/src/shaders_spirv/background_vert.inc index 1c23299..8458030 100644 --- a/src/shaders_spirv/background_vert.inc +++ b/src/shaders_spirv/background_vert.inc @@ -18,19 +18,19 @@ 0x00000025u, 0x00000002u, 0x59736572u, 0x00000000u, 0x00060006u, 0x00000025u, 0x00000003u, 0x61746f72u, 0x6e6f6974u, 0x00000000u, 0x00060006u, 0x00000025u, 0x00000004u, 0x65766177u, 0x73616850u, 0x00000065u, 0x00060006u, 0x00000025u, 0x00000005u, 0x64646170u, 0x31676e69u, 0x00000000u, 0x00060006u, 0x00000025u, - 0x00000006u, 0x64646170u, 0x32676e69u, 0x00000000u, 0x00030005u, 0x00000027u, 0x006f6275u, 0x00050048u, - 0x0000000bu, 0x00000000u, 0x0000000bu, 0x00000000u, 0x00050048u, 0x0000000bu, 0x00000001u, 0x0000000bu, - 0x00000001u, 0x00050048u, 0x0000000bu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x0000000bu, - 0x00000003u, 0x0000000bu, 0x00000004u, 0x00030047u, 0x0000000bu, 0x00000002u, 0x00040047u, 0x00000012u, + 0x00000006u, 0x64646170u, 0x32676e69u, 0x00000000u, 0x00030005u, 0x00000027u, 0x006f6275u, 0x00030047u, + 0x0000000bu, 0x00000002u, 0x00050048u, 0x0000000bu, 0x00000000u, 0x0000000bu, 0x00000000u, 0x00050048u, + 0x0000000bu, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u, 0x0000000bu, 0x00000002u, 0x0000000bu, + 0x00000003u, 0x00050048u, 0x0000000bu, 0x00000003u, 0x0000000bu, 0x00000004u, 0x00040047u, 0x00000012u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001bu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001du, 0x0000001eu, 0x00000001u, 0x00040047u, 0x00000020u, 0x0000001eu, 0x00000001u, 0x00040047u, 0x00000021u, - 0x0000001eu, 0x00000002u, 0x00040047u, 0x00000023u, 0x0000001eu, 0x00000002u, 0x00050048u, 0x00000025u, - 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000025u, 0x00000001u, 0x00000023u, 0x00000004u, - 0x00050048u, 0x00000025u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000025u, 0x00000003u, - 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000025u, 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, - 0x00000025u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000025u, 0x00000006u, 0x00000023u, - 0x00000018u, 0x00030047u, 0x00000025u, 0x00000002u, 0x00040047u, 0x00000027u, 0x00000022u, 0x00000000u, - 0x00040047u, 0x00000027u, 0x00000021u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, + 0x0000001eu, 0x00000002u, 0x00040047u, 0x00000023u, 0x0000001eu, 0x00000002u, 0x00030047u, 0x00000025u, + 0x00000002u, 0x00050048u, 0x00000025u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000025u, + 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000025u, 0x00000002u, 0x00000023u, 0x00000008u, + 0x00050048u, 0x00000025u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000025u, 0x00000004u, + 0x00000023u, 0x00000010u, 0x00050048u, 0x00000025u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, + 0x00000025u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00040047u, 0x00000027u, 0x00000021u, 0x00000000u, + 0x00040047u, 0x00000027u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u, 0x00000007u, 0x00000006u, 0x00000004u, 0x00040015u, 0x00000008u, 0x00000020u, 0x00000000u, 0x0004002bu, 0x00000008u, 0x00000009u, 0x00000001u, 0x0004001cu, 0x0000000au, 0x00000006u, 0x00000009u, 0x0006001eu, 0x0000000bu, 0x00000007u, 0x00000006u, diff --git a/src/shaders_spirv/geometry.frag.spv b/src/shaders_spirv/geometry.frag.spv index 73e8665..25e0760 100644 Binary files a/src/shaders_spirv/geometry.frag.spv and b/src/shaders_spirv/geometry.frag.spv differ diff --git a/src/shaders_spirv/geometry.vert.spv b/src/shaders_spirv/geometry.vert.spv index 99fb57f..53bba0b 100644 Binary files a/src/shaders_spirv/geometry.vert.spv and b/src/shaders_spirv/geometry.vert.spv differ diff --git a/src/shaders_spirv/geometry_frag.inc b/src/shaders_spirv/geometry_frag.inc index ee5898c..1b05693 100644 --- a/src/shaders_spirv/geometry_frag.inc +++ b/src/shaders_spirv/geometry_frag.inc @@ -13,13 +13,13 @@ 0x00000004u, 0x65766177u, 0x73616850u, 0x00000065u, 0x00060006u, 0x00000010u, 0x00000005u, 0x64646170u, 0x31676e69u, 0x00000000u, 0x00060006u, 0x00000010u, 0x00000006u, 0x64646170u, 0x32676e69u, 0x00000000u, 0x00030005u, 0x00000012u, 0x006f6275u, 0x00040047u, 0x00000009u, 0x0000001eu, 0x00000000u, 0x00040047u, - 0x0000000bu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000000fu, 0x0000001eu, 0x00000001u, 0x00050048u, - 0x00000010u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000010u, 0x00000001u, 0x00000023u, - 0x00000004u, 0x00050048u, 0x00000010u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000010u, - 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000010u, 0x00000004u, 0x00000023u, 0x00000010u, - 0x00050048u, 0x00000010u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000010u, 0x00000006u, - 0x00000023u, 0x00000018u, 0x00030047u, 0x00000010u, 0x00000002u, 0x00040047u, 0x00000012u, 0x00000022u, - 0x00000000u, 0x00040047u, 0x00000012u, 0x00000021u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, + 0x0000000bu, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000000fu, 0x0000001eu, 0x00000001u, 0x00030047u, + 0x00000010u, 0x00000002u, 0x00050048u, 0x00000010u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, + 0x00000010u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000010u, 0x00000002u, 0x00000023u, + 0x00000008u, 0x00050048u, 0x00000010u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000010u, + 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000010u, 0x00000005u, 0x00000023u, 0x00000014u, + 0x00050048u, 0x00000010u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00040047u, 0x00000012u, 0x00000021u, + 0x00000000u, 0x00040047u, 0x00000012u, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u, 0x00000007u, 0x00000006u, 0x00000004u, 0x00040020u, 0x00000008u, 0x00000003u, 0x00000007u, 0x0004003bu, 0x00000008u, 0x00000009u, 0x00000003u, 0x00040020u, 0x0000000au, 0x00000001u, 0x00000007u, 0x0004003bu, 0x0000000au, 0x0000000bu, diff --git a/src/shaders_spirv/geometry_vert.inc b/src/shaders_spirv/geometry_vert.inc index d92ed87..9ccc366 100644 --- a/src/shaders_spirv/geometry_vert.inc +++ b/src/shaders_spirv/geometry_vert.inc @@ -21,15 +21,15 @@ 0x00050005u, 0x00000038u, 0x67617266u, 0x6f6c6f43u, 0x00000072u, 0x00040005u, 0x0000003au, 0x6f436e69u, 0x00726f6cu, 0x00060005u, 0x0000003du, 0x67617266u, 0x43786554u, 0x64726f6fu, 0x00000000u, 0x00050005u, 0x0000003eu, 0x65546e69u, 0x6f6f4378u, 0x00006472u, 0x00040047u, 0x0000000fu, 0x0000001eu, 0x00000000u, - 0x00050048u, 0x00000015u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000015u, 0x00000001u, - 0x00000023u, 0x00000004u, 0x00050048u, 0x00000015u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, - 0x00000015u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000015u, 0x00000004u, 0x00000023u, - 0x00000010u, 0x00050048u, 0x00000015u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000015u, - 0x00000006u, 0x00000023u, 0x00000018u, 0x00030047u, 0x00000015u, 0x00000002u, 0x00040047u, 0x00000017u, - 0x00000022u, 0x00000000u, 0x00040047u, 0x00000017u, 0x00000021u, 0x00000000u, 0x00050048u, 0x0000002eu, - 0x00000000u, 0x0000000bu, 0x00000000u, 0x00050048u, 0x0000002eu, 0x00000001u, 0x0000000bu, 0x00000001u, - 0x00050048u, 0x0000002eu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x0000002eu, 0x00000003u, - 0x0000000bu, 0x00000004u, 0x00030047u, 0x0000002eu, 0x00000002u, 0x00040047u, 0x00000038u, 0x0000001eu, + 0x00030047u, 0x00000015u, 0x00000002u, 0x00050048u, 0x00000015u, 0x00000000u, 0x00000023u, 0x00000000u, + 0x00050048u, 0x00000015u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000015u, 0x00000002u, + 0x00000023u, 0x00000008u, 0x00050048u, 0x00000015u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, + 0x00000015u, 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000015u, 0x00000005u, 0x00000023u, + 0x00000014u, 0x00050048u, 0x00000015u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00040047u, 0x00000017u, + 0x00000021u, 0x00000000u, 0x00040047u, 0x00000017u, 0x00000022u, 0x00000000u, 0x00030047u, 0x0000002eu, + 0x00000002u, 0x00050048u, 0x0000002eu, 0x00000000u, 0x0000000bu, 0x00000000u, 0x00050048u, 0x0000002eu, + 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u, 0x0000002eu, 0x00000002u, 0x0000000bu, 0x00000003u, + 0x00050048u, 0x0000002eu, 0x00000003u, 0x0000000bu, 0x00000004u, 0x00040047u, 0x00000038u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000003au, 0x0000001eu, 0x00000001u, 0x00040047u, 0x0000003du, 0x0000001eu, 0x00000001u, 0x00040047u, 0x0000003eu, 0x0000001eu, 0x00000002u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040020u, 0x00000007u, 0x00000007u, diff --git a/src/shaders_spirv/text.frag.spv b/src/shaders_spirv/text.frag.spv index 063e964..106e5e2 100644 Binary files a/src/shaders_spirv/text.frag.spv and b/src/shaders_spirv/text.frag.spv differ diff --git a/src/shaders_spirv/text.vert.spv b/src/shaders_spirv/text.vert.spv index e96a8af..4eaf40d 100644 Binary files a/src/shaders_spirv/text.vert.spv and b/src/shaders_spirv/text.vert.spv differ diff --git a/src/shaders_spirv/text_frag.inc b/src/shaders_spirv/text_frag.inc index 97645c8..28ca1c7 100644 --- a/src/shaders_spirv/text_frag.inc +++ b/src/shaders_spirv/text_frag.inc @@ -13,15 +13,15 @@ 0x00000000u, 0x00060006u, 0x00000028u, 0x00000003u, 0x61746f72u, 0x6e6f6974u, 0x00000000u, 0x00060006u, 0x00000028u, 0x00000004u, 0x65766177u, 0x73616850u, 0x00000065u, 0x00060006u, 0x00000028u, 0x00000005u, 0x64646170u, 0x31676e69u, 0x00000000u, 0x00060006u, 0x00000028u, 0x00000006u, 0x64646170u, 0x32676e69u, - 0x00000000u, 0x00030005u, 0x0000002au, 0x006f6275u, 0x00040047u, 0x0000000cu, 0x00000022u, 0x00000000u, - 0x00040047u, 0x0000000cu, 0x00000021u, 0x00000001u, 0x00040047u, 0x00000010u, 0x0000001eu, 0x00000001u, + 0x00000000u, 0x00030005u, 0x0000002au, 0x006f6275u, 0x00040047u, 0x0000000cu, 0x00000021u, 0x00000001u, + 0x00040047u, 0x0000000cu, 0x00000022u, 0x00000000u, 0x00040047u, 0x00000010u, 0x0000001eu, 0x00000001u, 0x00040047u, 0x00000018u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x0000001au, 0x0000001eu, 0x00000000u, - 0x00050048u, 0x00000028u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000028u, 0x00000001u, - 0x00000023u, 0x00000004u, 0x00050048u, 0x00000028u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, - 0x00000028u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000028u, 0x00000004u, 0x00000023u, - 0x00000010u, 0x00050048u, 0x00000028u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000028u, - 0x00000006u, 0x00000023u, 0x00000018u, 0x00030047u, 0x00000028u, 0x00000002u, 0x00040047u, 0x0000002au, - 0x00000022u, 0x00000000u, 0x00040047u, 0x0000002au, 0x00000021u, 0x00000000u, 0x00020013u, 0x00000002u, + 0x00030047u, 0x00000028u, 0x00000002u, 0x00050048u, 0x00000028u, 0x00000000u, 0x00000023u, 0x00000000u, + 0x00050048u, 0x00000028u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000028u, 0x00000002u, + 0x00000023u, 0x00000008u, 0x00050048u, 0x00000028u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, + 0x00000028u, 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000028u, 0x00000005u, 0x00000023u, + 0x00000014u, 0x00050048u, 0x00000028u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00040047u, 0x0000002au, + 0x00000021u, 0x00000000u, 0x00040047u, 0x0000002au, 0x00000022u, 0x00000000u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040020u, 0x00000007u, 0x00000007u, 0x00000006u, 0x00090019u, 0x00000009u, 0x00000006u, 0x00000001u, 0x00000000u, 0x00000000u, 0x00000000u, 0x00000001u, 0x00000000u, 0x0003001bu, 0x0000000au, 0x00000009u, 0x00040020u, 0x0000000bu, diff --git a/src/shaders_spirv/text_vert.inc b/src/shaders_spirv/text_vert.inc index e17ed5c..a9520d5 100644 --- a/src/shaders_spirv/text_vert.inc +++ b/src/shaders_spirv/text_vert.inc @@ -19,16 +19,16 @@ 0x435f6c67u, 0x446c6c75u, 0x61747369u, 0x0065636eu, 0x00030005u, 0x0000002eu, 0x00000000u, 0x00050005u, 0x00000036u, 0x67617266u, 0x6f6c6f43u, 0x00000072u, 0x00040005u, 0x00000038u, 0x6f436e69u, 0x00726f6cu, 0x00060005u, 0x0000003bu, 0x67617266u, 0x43786554u, 0x64726f6fu, 0x00000000u, 0x00050005u, 0x0000003cu, - 0x65546e69u, 0x6f6f4378u, 0x00006472u, 0x00040047u, 0x0000000bu, 0x0000001eu, 0x00000000u, 0x00050048u, - 0x00000013u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000013u, 0x00000001u, 0x00000023u, - 0x00000004u, 0x00050048u, 0x00000013u, 0x00000002u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000013u, - 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000013u, 0x00000004u, 0x00000023u, 0x00000010u, - 0x00050048u, 0x00000013u, 0x00000005u, 0x00000023u, 0x00000014u, 0x00050048u, 0x00000013u, 0x00000006u, - 0x00000023u, 0x00000018u, 0x00030047u, 0x00000013u, 0x00000002u, 0x00040047u, 0x00000015u, 0x00000022u, - 0x00000000u, 0x00040047u, 0x00000015u, 0x00000021u, 0x00000000u, 0x00050048u, 0x0000002cu, 0x00000000u, - 0x0000000bu, 0x00000000u, 0x00050048u, 0x0000002cu, 0x00000001u, 0x0000000bu, 0x00000001u, 0x00050048u, - 0x0000002cu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, 0x0000002cu, 0x00000003u, 0x0000000bu, - 0x00000004u, 0x00030047u, 0x0000002cu, 0x00000002u, 0x00040047u, 0x00000036u, 0x0000001eu, 0x00000000u, + 0x65546e69u, 0x6f6f4378u, 0x00006472u, 0x00040047u, 0x0000000bu, 0x0000001eu, 0x00000000u, 0x00030047u, + 0x00000013u, 0x00000002u, 0x00050048u, 0x00000013u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, + 0x00000013u, 0x00000001u, 0x00000023u, 0x00000004u, 0x00050048u, 0x00000013u, 0x00000002u, 0x00000023u, + 0x00000008u, 0x00050048u, 0x00000013u, 0x00000003u, 0x00000023u, 0x0000000cu, 0x00050048u, 0x00000013u, + 0x00000004u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000013u, 0x00000005u, 0x00000023u, 0x00000014u, + 0x00050048u, 0x00000013u, 0x00000006u, 0x00000023u, 0x00000018u, 0x00040047u, 0x00000015u, 0x00000021u, + 0x00000000u, 0x00040047u, 0x00000015u, 0x00000022u, 0x00000000u, 0x00030047u, 0x0000002cu, 0x00000002u, + 0x00050048u, 0x0000002cu, 0x00000000u, 0x0000000bu, 0x00000000u, 0x00050048u, 0x0000002cu, 0x00000001u, + 0x0000000bu, 0x00000001u, 0x00050048u, 0x0000002cu, 0x00000002u, 0x0000000bu, 0x00000003u, 0x00050048u, + 0x0000002cu, 0x00000003u, 0x0000000bu, 0x00000004u, 0x00040047u, 0x00000036u, 0x0000001eu, 0x00000000u, 0x00040047u, 0x00000038u, 0x0000001eu, 0x00000001u, 0x00040047u, 0x0000003bu, 0x0000001eu, 0x00000001u, 0x00040047u, 0x0000003cu, 0x0000001eu, 0x00000002u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00030016u, 0x00000006u, 0x00000020u, 0x00040017u, 0x00000007u, 0x00000006u, 0x00000002u, diff --git a/src/vulkanwidget.cpp b/src/vulkanwidget.cpp index 1bff465..c6e9606 100644 --- a/src/vulkanwidget.cpp +++ b/src/vulkanwidget.cpp @@ -18,7 +18,7 @@ #include "third_party/volk/volk.h" #ifdef __APPLE__ -#include "vulkanwidget_macos.h" +#include "platform/vulkanwidget_macos.h" #endif #ifndef M_PI