Browse Source

Xcode 프로젝트 수정.

ComputeShader 클래스명 변경, 일부 변수명 변경
Hongtae Kim 5 years ago
parent
commit
04d6bf39ac

+ 3
- 0
Samples.xcworkspace/contents.xcworkspacedata View File

@@ -5,6 +5,9 @@
5 5
       location = "container:"
6 6
       name = "Samples">
7 7
       <FileRef
8
+         location = "group:Samples/ComputeShader/ComputeShader.xcodeproj">
9
+      </FileRef>
10
+      <FileRef
8 11
          location = "group:Samples/Mesh/Mesh.xcodeproj">
9 12
       </FileRef>
10 13
       <FileRef

+ 8
- 8
Samples/ComputeShader/ComputeShader.cpp View File

@@ -191,7 +191,7 @@ public:
191 191
     UBO* UniformBufferO() { return ubo; }
192 192
 };
193 193
 
194
-class MeshDemo : public SampleApp
194
+class ComputeShaderDemo : public SampleApp
195 195
 {
196 196
     DKObject<DKWindow> window;
197 197
 	DKObject<DKThread> renderThread;
@@ -201,7 +201,7 @@ class MeshDemo : public SampleApp
201 201
 	DKObject<UVQuad> quad;
202 202
     DKObject<DKTexture> textureColorMap;
203 203
 
204
-    DKObject<TextureComputeTarget> ComputeTarget;
204
+    DKObject<TextureComputeTarget> computeTarget;
205 205
     DKObject<DKSamplerState> sampleState = nullptr;;
206 206
 
207 207
     DKObject<GraphicShaderBindingSet> graphicShaderBindingSet = nullptr;
@@ -297,7 +297,7 @@ public:
297 297
 
298 298
         // Texture Resource Initialize
299 299
         
300
-        ComputeTarget = DKOBJECT_NEW TextureComputeTarget();
300
+        computeTarget = DKOBJECT_NEW TextureComputeTarget();
301 301
         
302 302
         DKSamplerDescriptor computeSamplerDesc = {};
303 303
         computeSamplerDesc.magFilter = DKSamplerDescriptor::MinMagFilterLinear;
@@ -401,7 +401,7 @@ public:
401 401
 
402 402
         DKComputePipelineDescriptor embossComputePipelineDescriptor;
403 403
         embossComputePipelineDescriptor.computeFunction = cs_ef;
404
-        auto Emboss = device->CreateComputePipeline(embossComputePipelineDescriptor);
404
+        auto emboss = device->CreateComputePipeline(embossComputePipelineDescriptor);
405 405
         
406 406
         DKObject<DKTexture> depthBuffer = nullptr;
407 407
         DKObject<DKTexture> targettex = nullptr;
@@ -444,7 +444,7 @@ public:
444 444
             rpd.depthStencilAttachment.loadAction = DKRenderPassAttachmentDescriptor::LoadActionClear;
445 445
             rpd.depthStencilAttachment.storeAction = DKRenderPassAttachmentDescriptor::StoreActionDontCare;
446 446
 
447
-            targettex = ComputeTarget->ComputeTarget(computeQueue, width, height);
447
+            targettex = computeTarget->ComputeTarget(computeQueue, width, height);
448 448
 
449 449
             DKObject<DKCommandBuffer> computeCmdbuffer = computeQueue->CreateCommandBuffer();
450 450
             DKObject<DKComputeCommandEncoder> computeEncoder = computeCmdbuffer->CreateComputeCommandEncoder();
@@ -455,7 +455,7 @@ public:
455 455
                     computebindSet->SetTexture(0, texture);
456 456
                     computebindSet->SetTexture(1, targettex);
457 457
                 }
458
-                computeEncoder->SetComputePipelineState(Emboss);
458
+                computeEncoder->SetComputePipelineState(emboss);
459 459
                 computeEncoder->SetResources(0, computebindSet);
460 460
                 computeEncoder->Dispatch(width / 16, height / 16, 1);
461 461
                 computeEncoder->EndEncoding();
@@ -516,7 +516,7 @@ public:
516 516
         quad = DKOBJECT_NEW UVQuad();
517 517
 
518 518
 		runningRenderThread = 1;
519
-		renderThread = DKThread::Create(DKFunction(this, &MeshDemo::RenderThread)->Invocation());
519
+		renderThread = DKThread::Create(DKFunction(this, &ComputeShaderDemo::RenderThread)->Invocation());
520 520
 	}
521 521
 	void OnTerminate(void) override
522 522
 	{
@@ -541,7 +541,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
541 541
 int main(int argc, const char * argv[])
542 542
 #endif
543 543
 {
544
-    MeshDemo app;
544
+    ComputeShaderDemo app;
545 545
 	DKPropertySet::SystemConfig().SetValue("AppDelegate", "AppDelegate");
546 546
 	DKPropertySet::SystemConfig().SetValue("GraphicsAPI", "Vulkan");
547 547
 	return app.Run();

+ 24
- 30
Samples/ComputeShader/ComputeShader.xcodeproj/project.pbxproj View File

@@ -7,8 +7,8 @@
7 7
 	objects = {
8 8
 
9 9
 /* Begin PBXBuildFile section */
10
-		66DA89941DD3117F00338015 /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 844A9A801DD0C080007DCC89 /* Mesh.cpp */; };
11
-		66DA89971DD3118000338015 /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 844A9A801DD0C080007DCC89 /* Mesh.cpp */; };
10
+		66DA89941DD3117F00338015 /* ComputeShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 844A9A801DD0C080007DCC89 /* ComputeShader.cpp */; };
11
+		66DA89971DD3118000338015 /* ComputeShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 844A9A801DD0C080007DCC89 /* ComputeShader.cpp */; };
12 12
 		8406D1D821E715E400E0EA0F /* libDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8406D1BF21E701FF00E0EA0F /* libDK.a */; };
13 13
 		8406D1F921E71C5500E0EA0F /* libDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8406D1C121E701FF00E0EA0F /* libDK.a */; };
14 14
 		841948EB1DDCBE6000E039F0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 841948E91DDCBE5000E039F0 /* AppDelegate.m */; };
@@ -18,8 +18,6 @@
18 18
 		844A9A851DD0C080007DCC89 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 844A9A781DD0C080007DCC89 /* Assets.xcassets */; };
19 19
 		844A9A8B1DD0C08F007DCC89 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 844A9A741DD0C080007DCC89 /* Assets.xcassets */; };
20 20
 		844A9A8D1DD0C08F007DCC89 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 844A9A761DD0C080007DCC89 /* LaunchScreen.storyboard */; };
21
-		84A81E9D226443700060BCBB /* tiny_obj_loader.cc in Sources */ = {isa = PBXBuildFile; fileRef = 84A81E9C226443700060BCBB /* tiny_obj_loader.cc */; };
22
-		84A81E9E226443700060BCBB /* tiny_obj_loader.cc in Sources */ = {isa = PBXBuildFile; fileRef = 84A81E9C226443700060BCBB /* tiny_obj_loader.cc */; };
23 21
 		84A81EAF22644A7D0060BCBB /* dkgl_new.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B5FE4B20726C3600B52742 /* dkgl_new.cpp */; };
24 22
 		84A81EB222644A7E0060BCBB /* dkgl_new.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B5FE4B20726C3600B52742 /* dkgl_new.cpp */; };
25 23
 /* End PBXBuildFile section */
@@ -76,8 +74,8 @@
76 74
 		841948EC1DDCBE7500E039F0 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
77 75
 		841948ED1DDCBE7500E039F0 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
78 76
 		8420EE1F1EE5BA6500A20933 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Data; path = ../Data; sourceTree = "<group>"; };
79
-		844A9A441DD0BCFD007DCC89 /* Mesh_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mesh_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
80
-		844A9A5C1DD0BEDD007DCC89 /* Mesh_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mesh_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
77
+		844A9A441DD0BCFD007DCC89 /* ComputeShader_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ComputeShader_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
78
+		844A9A5C1DD0BEDD007DCC89 /* ComputeShader_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ComputeShader_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
81 79
 		844A9A741DD0C080007DCC89 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
82 80
 		844A9A751DD0C080007DCC89 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
83 81
 		844A9A761DD0C080007DCC89 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -88,8 +86,7 @@
88 86
 		844A9A7D1DD0C080007DCC89 /* targetver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = targetver.h; sourceTree = "<group>"; };
89 87
 		844A9A7E1DD0C080007DCC89 /* SampleApp.ico */ = {isa = PBXFileReference; lastKnownFileType = image.ico; path = SampleApp.ico; sourceTree = "<group>"; };
90 88
 		844A9A7F1DD0C080007DCC89 /* SampleApp.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SampleApp.rc; sourceTree = "<group>"; };
91
-		844A9A801DD0C080007DCC89 /* Mesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mesh.cpp; sourceTree = "<group>"; };
92
-		84A81E9C226443700060BCBB /* tiny_obj_loader.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tiny_obj_loader.cc; path = ../Libs/tinyobjLoader/tiny_obj_loader.cc; sourceTree = "<group>"; };
89
+		844A9A801DD0C080007DCC89 /* ComputeShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComputeShader.cpp; sourceTree = "<group>"; };
93 90
 		84B5FE4B20726C3600B52742 /* dkgl_new.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dkgl_new.cpp; sourceTree = "<group>"; };
94 91
 		84B81E9021E6FF8400E0C5FF /* app.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = app.h; sourceTree = "<group>"; };
95 92
 		84B81E9121E6FF8400E0C5FF /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = util.h; sourceTree = "<group>"; };
@@ -148,8 +145,8 @@
148 145
 		844A9A451DD0BCFD007DCC89 /* Products */ = {
149 146
 			isa = PBXGroup;
150 147
 			children = (
151
-				844A9A441DD0BCFD007DCC89 /* Mesh_macOS.app */,
152
-				844A9A5C1DD0BEDD007DCC89 /* Mesh_iOS.app */,
148
+				844A9A441DD0BCFD007DCC89 /* ComputeShader_macOS.app */,
149
+				844A9A5C1DD0BEDD007DCC89 /* ComputeShader_iOS.app */,
153 150
 			);
154 151
 			name = Products;
155 152
 			sourceTree = "<group>";
@@ -157,8 +154,7 @@
157 154
 		844A9A461DD0BCFD007DCC89 /* Source Files */ = {
158 155
 			isa = PBXGroup;
159 156
 			children = (
160
-				84A81E9C226443700060BCBB /* tiny_obj_loader.cc */,
161
-				844A9A801DD0C080007DCC89 /* Mesh.cpp */,
157
+				844A9A801DD0C080007DCC89 /* ComputeShader.cpp */,
162 158
 			);
163 159
 			name = "Source Files";
164 160
 			sourceTree = "<group>";
@@ -215,9 +211,9 @@
215 211
 /* End PBXGroup section */
216 212
 
217 213
 /* Begin PBXNativeTarget section */
218
-		844A9A431DD0BCFD007DCC89 /* Mesh_macOS */ = {
214
+		844A9A431DD0BCFD007DCC89 /* ComputeShader_macOS */ = {
219 215
 			isa = PBXNativeTarget;
220
-			buildConfigurationList = 844A9A551DD0BCFD007DCC89 /* Build configuration list for PBXNativeTarget "Mesh_macOS" */;
216
+			buildConfigurationList = 844A9A551DD0BCFD007DCC89 /* Build configuration list for PBXNativeTarget "ComputeShader_macOS" */;
221 217
 			buildPhases = (
222 218
 				844A9A401DD0BCFD007DCC89 /* Sources */,
223 219
 				844A9A411DD0BCFD007DCC89 /* Frameworks */,
@@ -228,14 +224,14 @@
228 224
 			dependencies = (
229 225
 				8406D1DC21E715FD00E0EA0F /* PBXTargetDependency */,
230 226
 			);
231
-			name = Mesh_macOS;
227
+			name = ComputeShader_macOS;
232 228
 			productName = TestApp1;
233
-			productReference = 844A9A441DD0BCFD007DCC89 /* Mesh_macOS.app */;
229
+			productReference = 844A9A441DD0BCFD007DCC89 /* ComputeShader_macOS.app */;
234 230
 			productType = "com.apple.product-type.application";
235 231
 		};
236
-		844A9A5B1DD0BEDD007DCC89 /* Mesh_iOS */ = {
232
+		844A9A5B1DD0BEDD007DCC89 /* ComputeShader_iOS */ = {
237 233
 			isa = PBXNativeTarget;
238
-			buildConfigurationList = 844A9A701DD0BEDD007DCC89 /* Build configuration list for PBXNativeTarget "Mesh_iOS" */;
234
+			buildConfigurationList = 844A9A701DD0BEDD007DCC89 /* Build configuration list for PBXNativeTarget "ComputeShader_iOS" */;
239 235
 			buildPhases = (
240 236
 				844A9A581DD0BEDD007DCC89 /* Sources */,
241 237
 				844A9A591DD0BEDD007DCC89 /* Frameworks */,
@@ -246,9 +242,9 @@
246 242
 			dependencies = (
247 243
 				8406D1DA21E715F400E0EA0F /* PBXTargetDependency */,
248 244
 			);
249
-			name = Mesh_iOS;
245
+			name = ComputeShader_iOS;
250 246
 			productName = TestApp1_iOS;
251
-			productReference = 844A9A5C1DD0BEDD007DCC89 /* Mesh_iOS.app */;
247
+			productReference = 844A9A5C1DD0BEDD007DCC89 /* ComputeShader_iOS.app */;
252 248
 			productType = "com.apple.product-type.application";
253 249
 		};
254 250
 /* End PBXNativeTarget section */
@@ -271,7 +267,7 @@
271 267
 					};
272 268
 				};
273 269
 			};
274
-			buildConfigurationList = 844A9A3F1DD0BCFD007DCC89 /* Build configuration list for PBXProject "Mesh" */;
270
+			buildConfigurationList = 844A9A3F1DD0BCFD007DCC89 /* Build configuration list for PBXProject "ComputeShader" */;
275 271
 			compatibilityVersion = "Xcode 3.2";
276 272
 			developmentRegion = English;
277 273
 			hasScannedForEncodings = 0;
@@ -291,8 +287,8 @@
291 287
 			);
292 288
 			projectRoot = "";
293 289
 			targets = (
294
-				844A9A431DD0BCFD007DCC89 /* Mesh_macOS */,
295
-				844A9A5B1DD0BEDD007DCC89 /* Mesh_iOS */,
290
+				844A9A431DD0BCFD007DCC89 /* ComputeShader_macOS */,
291
+				844A9A5B1DD0BEDD007DCC89 /* ComputeShader_iOS */,
296 292
 			);
297 293
 		};
298 294
 /* End PBXProject section */
@@ -357,8 +353,7 @@
357 353
 			files = (
358 354
 				84A81EAF22644A7D0060BCBB /* dkgl_new.cpp in Sources */,
359 355
 				841948EF1DDCBE7B00E039F0 /* AppDelegate.m in Sources */,
360
-				84A81E9D226443700060BCBB /* tiny_obj_loader.cc in Sources */,
361
-				66DA89941DD3117F00338015 /* Mesh.cpp in Sources */,
356
+				66DA89941DD3117F00338015 /* ComputeShader.cpp in Sources */,
362 357
 			);
363 358
 			runOnlyForDeploymentPostprocessing = 0;
364 359
 		};
@@ -368,8 +363,7 @@
368 363
 			files = (
369 364
 				84A81EB222644A7E0060BCBB /* dkgl_new.cpp in Sources */,
370 365
 				841948EB1DDCBE6000E039F0 /* AppDelegate.m in Sources */,
371
-				84A81E9E226443700060BCBB /* tiny_obj_loader.cc in Sources */,
372
-				66DA89971DD3118000338015 /* Mesh.cpp in Sources */,
366
+				66DA89971DD3118000338015 /* ComputeShader.cpp in Sources */,
373 367
 			);
374 368
 			runOnlyForDeploymentPostprocessing = 0;
375 369
 		};
@@ -554,7 +548,7 @@
554 548
 /* End XCBuildConfiguration section */
555 549
 
556 550
 /* Begin XCConfigurationList section */
557
-		844A9A3F1DD0BCFD007DCC89 /* Build configuration list for PBXProject "Mesh" */ = {
551
+		844A9A3F1DD0BCFD007DCC89 /* Build configuration list for PBXProject "ComputeShader" */ = {
558 552
 			isa = XCConfigurationList;
559 553
 			buildConfigurations = (
560 554
 				844A9A531DD0BCFD007DCC89 /* Debug */,
@@ -563,7 +557,7 @@
563 557
 			defaultConfigurationIsVisible = 0;
564 558
 			defaultConfigurationName = Release;
565 559
 		};
566
-		844A9A551DD0BCFD007DCC89 /* Build configuration list for PBXNativeTarget "Mesh_macOS" */ = {
560
+		844A9A551DD0BCFD007DCC89 /* Build configuration list for PBXNativeTarget "ComputeShader_macOS" */ = {
567 561
 			isa = XCConfigurationList;
568 562
 			buildConfigurations = (
569 563
 				844A9A561DD0BCFD007DCC89 /* Debug */,
@@ -572,7 +566,7 @@
572 566
 			defaultConfigurationIsVisible = 0;
573 567
 			defaultConfigurationName = Release;
574 568
 		};
575
-		844A9A701DD0BEDD007DCC89 /* Build configuration list for PBXNativeTarget "Mesh_iOS" */ = {
569
+		844A9A701DD0BEDD007DCC89 /* Build configuration list for PBXNativeTarget "ComputeShader_iOS" */ = {
576 570
 			isa = XCConfigurationList;
577 571
 			buildConfigurations = (
578 572
 				844A9A711DD0BEDD007DCC89 /* Debug */,