Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,13 @@
*.out
*.app

scenes/
scenes/

apps/apple/VulkanSplatting/shaders.h
apps/apple/MoltenVK
apps/apple/VulkanSplatting/ThirdParty

# xcuserdata under any directory is ignored
xcuserdata/

project.xcconfig
17 changes: 3 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,7 @@ else ()
add_compile_definitions(NDEBUG)
endif ()

add_compile_definitions(VKGS_ENABLE_GLFW)

add_subdirectory(src)
add_subdirectory(apps)

#add_custom_target(
# Shaders
# DEPENDS ${SPIRV_BINARY_FILES} ${SHADER_HEADER}
#)
#include_directories(${PROJECT_BINARY_DIR}/shaders)

#add_custom_command(TARGET vulkan_splatting POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:vulkan_splatting>/shaders/"
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# "${PROJECT_BINARY_DIR}/shaders"
# "$<TARGET_FILE_DIR:vulkan_splatting>/shaders"
#)
add_subdirectory(apps)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_SDK=\INSTALL\LOCATION\OF\YOUR\SDK -S .

After installing the Vulkan SDK, please proceed with CMake configuration and build steps as usual.

### iOS, iPadOS, visionOS
1. Make sure that the Vulkan SDK is installed
2. Run the `xcode_setup` CMake target
3. Set your development team id in `project.xcconfig`
4. Profit

## TODO

- [x] Better controls and GUI on GLFW
Expand Down
3 changes: 2 additions & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cmake_minimum_required(VERSION 3.26)

add_subdirectory(viewer)
add_subdirectory(viewer)
add_subdirectory(apple)
12 changes: 12 additions & 0 deletions apps/apple/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.26)

set(XCODE_THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/apps/apple/VulkanSplatting/ThirdParty)

add_custom_target(xcode_thirdparty DEPENDS ${XCODE_THIRDPARTY_DIR})

add_custom_command(OUTPUT ${XCODE_THIRDPARTY_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${XCODE_THIRDPARTY_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${glm_SOURCE_DIR} ${XCODE_THIRDPARTY_DIR}/glm
)

add_custom_target(xcode_setup DEPENDS xcode_thirdparty xcode_shaders)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
37 changes: 37 additions & 0 deletions apps/apple/VulkanSplatting/VulkanSplatting-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#include "VulkanSplatting.h"
#include <memory>
#include <iostream>

static VulkanSplatting *_instance = nullptr;

void vkgs_initialize(VulkanSplatting::RendererConfiguration config) {
_instance = new VulkanSplatting(config);
// try {
_instance->initialize();
// } catch (const std::exception& e) {
// // print error
// std::cerr << e.what() << std::endl;
// }
}

void vkgs_draw() {
_instance->draw();
}

void vkgs_pan_translation(float x, float y) {
_instance->logTranslation(x, y);
}

void vkgs_movement(float x, float y, float z) {
_instance->logMovement(x, y, z);
}

void vkgs_cleanup() {
_instance->stop();
delete _instance;
_instance = nullptr;
}
1,490 changes: 1,490 additions & 0 deletions apps/apple/VulkanSplatting/VulkanSplatting.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0EA8A4C2BA2FDC7003B92F7"
BuildableName = "VulkanSplatting.app"
BlueprintName = "VulkanSplatting"
ReferencedContainer = "container:VulkanSplatting.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0EA8A4C2BA2FDC7003B92F7"
BuildableName = "VulkanSplatting.app"
BlueprintName = "VulkanSplatting"
ReferencedContainer = "container:VulkanSplatting.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0EA8A4C2BA2FDC7003B92F7"
BuildableName = "VulkanSplatting.app"
BlueprintName = "VulkanSplatting"
ReferencedContainer = "container:VulkanSplatting.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "logo.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "github-mark-white.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "logo.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading