Skip to content

Commit

Permalink
Add README n stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SaganRitual committed Jul 9, 2020
1 parent 6b03c3e commit c1191de
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Foil.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
D42485E124B6D76700E7EDEE /* SimulationImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D42485E024B6D76700E7EDEE /* SimulationImage.png */; };
D42B958B24648E2900F4B5B0 /* FoilShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = D42B958A24648E2900F4B5B0 /* FoilShaders.metal */; };
D4AC68B8245CF43F00917569 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AC68B7245CF43F00917569 /* AppDelegate.swift */; };
D4AC68BA245CF43F00917569 /* FoilViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AC68B9245CF43F00917569 /* FoilViewController.swift */; };
Expand All @@ -20,6 +21,8 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
D42485DE24B6D09100E7EDEE /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.markdown; };
D42485E024B6D76700E7EDEE /* SimulationImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SimulationImage.png; sourceTree = "<group>"; };
D42B958A24648E2900F4B5B0 /* FoilShaders.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = FoilShaders.metal; sourceTree = "<group>"; };
D475693C2469259D000F87AE /* Foil-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Foil-Bridging-Header.h"; sourceTree = "<group>"; };
D475693F24692638000F87AE /* FoilShaderTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoilShaderTypes.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -53,6 +56,8 @@
D4AC68AB245CF43F00917569 = {
isa = PBXGroup;
children = (
D42485DE24B6D09100E7EDEE /* README.md */,
D42485E024B6D76700E7EDEE /* SimulationImage.png */,
D4AC68B6245CF43F00917569 /* Foil */,
D4AC68C7245CF56900917569 /* Renderer */,
D4F680AA245FACA4000B8EF2 /* Simulation */,
Expand Down Expand Up @@ -173,6 +178,7 @@
files = (
D4AC68BC245CF44000917569 /* Assets.xcassets in Resources */,
D4AC68BF245CF44000917569 /* Main.storyboard in Resources */,
D42485E124B6D76700E7EDEE /* SimulationImage.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Foil

## Apple's Metal example code, hugely simplified and translated to Swift

In case it helps anyone, I translated this from Apple's Objective-C example
[Selecting Device Objects For Compute Processing](https://developer.apple.com/documentation/metal/gpu_selection_in_macos/selecting_device_objects_for_compute_processing).
I pared it down quite a bit too, because I ran into trouble with it and decided to ask for help
on StackOverflow. For which, many thanks to [Tyler](https://stackoverflow.com/users/988260/tyler)
for his brilliant [help](https://stackoverflow.com/questions/61742070/macos-metal-app-works-in-obj-c-fails-to-draw-in-swift-translation).

I think it's more-or-less self-explanatory, or maybe I'm just too busy to write a nice, useful
description of it, or maybe just too lazy. Anyway, build and run, it's fun to watch.

Binary file added SimulationImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c1191de

Please sign in to comment.