All copyable terminal commands from the video.
Check that the Swift compiler works from the command line.
Application: Terminal
| #if os(Windows) | |
| import FidelityFX | |
| import SwiftCOM | |
| import WinSDK | |
| #endif | |
| #if os(Windows) | |
| private func createFFXSurfaceFormat( | |
| _ format: DXGI_FORMAT | |
| ) -> FfxApiSurfaceFormat { |
| import Foundation | |
| import GIFModule | |
| import HDL | |
| import MM4 | |
| import MolecularRenderer | |
| import QuaternionModule | |
| import xTB | |
| // MARK: - User-Facing Options |
| // | |
| // FIRE.swift | |
| // MolecularRendererApp | |
| // | |
| // Created by Philip Turner on 5/31/24. | |
| // | |
| import HDL | |
| import Numerics |
| // | |
| // FIRE.swift | |
| // MolecularRendererApp | |
| // | |
| // Created by Philip Turner on 5/31/24. | |
| // | |
| import HDL | |
| import Numerics |
| import HDL | |
| import MolecularRenderer | |
| import QuaternionModule | |
| // MARK: - Compile Structure | |
| func passivate(topology: inout Topology) { | |
| func createHydrogen( | |
| atomID: UInt32, | |
| orbital: SIMD3<Float> |
| // For profiling with D3D12 timestamp queries. | |
| #if os(Windows) | |
| import SwiftCOM | |
| import WinSDK | |
| #endif | |
| // Temporary import for profiling CPU-side bottleneck. | |
| import Foundation | |
| public struct PerformanceMeter { |
| // For profiling with D3D12 timestamp queries. | |
| #if os(Windows) | |
| import SwiftCOM | |
| import WinSDK | |
| #endif | |
| // TODO: Before finishing the acceleration structure PR, remove the public | |
| // modifier for the functions in this extension. | |
| extension Application { | |
| public func checkCrashBuffer(frameID: Int) { |
| extension Application { | |
| // TODO: Before finishing the acceleration structure PR, remove the public | |
| // modifier for this. | |
| public func updateBVH(inFlightFrameID: Int) { | |
| let transaction = atoms.registerChanges() | |
| device.commandQueue.withCommandList { commandList in | |
| // Bind the descriptor heap. | |
| #if os(Windows) | |
| commandList.setDescriptorHeap(descriptorHeap) |
| extension Application { | |
| // Will eventually remove the public modifier and automatically invoke this | |
| // inside 'application.render()'. | |
| public func updateBVH(inFlightFrameID: Int) { | |
| updateBVH1(inFlightFrameID: inFlightFrameID) | |
| updateBVH2(inFlightFrameID: inFlightFrameID) | |
| } | |
| public func updateBVH1(inFlightFrameID: Int) { | |
| let transaction = atoms.registerChanges() |