瀏覽代碼

Properly orient game:graphics

Sam Jaffe 6 年之前
父節點
當前提交
ad9058891c

+ 5 - 34
graphics/graphics.xcodeproj/project.pbxproj

@@ -8,31 +8,22 @@
 
 /* Begin PBXBuildFile section */
 		CD3AC6F21D2C03B7002B4BB0 /* material.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC6F01D2C03B7002B4BB0 /* material.cpp */; };
-		CD3AC6F31D2C03B7002B4BB0 /* material.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC6F11D2C03B7002B4BB0 /* material.hpp */; };
 		CD3AC6F51D2C04DC002B4BB0 /* libmath.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CD3AC6F41D2C04DC002B4BB0 /* libmath.dylib */; };
 		CD3AC6F81D2C0518002B4BB0 /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC6F61D2C0518002B4BB0 /* texture.cpp */; };
-		CD3AC6F91D2C0518002B4BB0 /* texture.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC6F71D2C0518002B4BB0 /* texture.hpp */; };
 		CD3AC6FD1D2C06B5002B4BB0 /* shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC6FB1D2C06B5002B4BB0 /* shader.cpp */; };
-		CD3AC6FE1D2C06B5002B4BB0 /* shader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC6FC1D2C06B5002B4BB0 /* shader.hpp */; };
 		CD3AC7191D2C0950002B4BB0 /* shader_program.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC7171D2C0950002B4BB0 /* shader_program.cpp */; };
-		CD3AC71A1D2C0950002B4BB0 /* shader_program.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC7181D2C0950002B4BB0 /* shader_program.hpp */; };
 		CD3AC7261D2C0C63002B4BB0 /* object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3AC7241D2C0C63002B4BB0 /* object.cpp */; };
-		CD3AC7271D2C0C63002B4BB0 /* object.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD3AC7251D2C0C63002B4BB0 /* object.hpp */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
 		CD3AC6E21D2C0364002B4BB0 /* libgraphics.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libgraphics.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		CD3AC6F01D2C03B7002B4BB0 /* material.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = material.cpp; sourceTree = "<group>"; };
-		CD3AC6F11D2C03B7002B4BB0 /* material.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = material.hpp; sourceTree = "<group>"; };
 		CD3AC6F41D2C04DC002B4BB0 /* libmath.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmath.dylib; path = "../../../../../Library/Developer/Xcode/DerivedData/game-fzozuoevjsbueyhaskmxixpdawcn/Build/Products/Debug/libmath.dylib"; sourceTree = "<group>"; };
 		CD3AC6F61D2C0518002B4BB0 /* texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = texture.cpp; sourceTree = "<group>"; };
-		CD3AC6F71D2C0518002B4BB0 /* texture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = texture.hpp; sourceTree = "<group>"; };
 		CD3AC6FB1D2C06B5002B4BB0 /* shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shader.cpp; sourceTree = "<group>"; };
-		CD3AC6FC1D2C06B5002B4BB0 /* shader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = shader.hpp; sourceTree = "<group>"; };
 		CD3AC7171D2C0950002B4BB0 /* shader_program.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shader_program.cpp; sourceTree = "<group>"; };
-		CD3AC7181D2C0950002B4BB0 /* shader_program.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = shader_program.hpp; sourceTree = "<group>"; };
 		CD3AC7241D2C0C63002B4BB0 /* object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object.cpp; sourceTree = "<group>"; };
-		CD3AC7251D2C0C63002B4BB0 /* object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = object.hpp; sourceTree = "<group>"; };
+		CDA34D86225171AA008036A7 /* game */ = {isa = PBXFileReference; lastKnownFileType = folder; name = game; path = include/game; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -51,6 +42,7 @@
 			isa = PBXGroup;
 			children = (
 				CD3AC6F41D2C04DC002B4BB0 /* libmath.dylib */,
+				CDA34D86225171AA008036A7 /* game */,
 				CD3AC6E41D2C0364002B4BB0 /* src */,
 				CD3AC6E31D2C0364002B4BB0 /* Products */,
 			);
@@ -65,29 +57,15 @@
 			sourceTree = "<group>";
 		};
 		CD3AC6E41D2C0364002B4BB0 /* src */ = {
-			isa = PBXGroup;
-			children = (
-				CD3AC71B1D2C0955002B4BB0 /* datamodel */,
-			);
-			name = src;
-			path = graphics;
-			sourceTree = "<group>";
-		};
-		CD3AC71B1D2C0955002B4BB0 /* datamodel */ = {
 			isa = PBXGroup;
 			children = (
 				CD3AC6F01D2C03B7002B4BB0 /* material.cpp */,
-				CD3AC6F11D2C03B7002B4BB0 /* material.hpp */,
 				CD3AC6FB1D2C06B5002B4BB0 /* shader.cpp */,
-				CD3AC6FC1D2C06B5002B4BB0 /* shader.hpp */,
 				CD3AC7171D2C0950002B4BB0 /* shader_program.cpp */,
-				CD3AC7181D2C0950002B4BB0 /* shader_program.hpp */,
 				CD3AC6F61D2C0518002B4BB0 /* texture.cpp */,
-				CD3AC6F71D2C0518002B4BB0 /* texture.hpp */,
 				CD3AC7241D2C0C63002B4BB0 /* object.cpp */,
-				CD3AC7251D2C0C63002B4BB0 /* object.hpp */,
 			);
-			name = datamodel;
+			path = src;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
@@ -97,11 +75,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD3AC6F91D2C0518002B4BB0 /* texture.hpp in Headers */,
-				CD3AC6FE1D2C06B5002B4BB0 /* shader.hpp in Headers */,
-				CD3AC71A1D2C0950002B4BB0 /* shader_program.hpp in Headers */,
-				CD3AC6F31D2C03B7002B4BB0 /* material.hpp in Headers */,
-				CD3AC7271D2C0C63002B4BB0 /* object.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -175,7 +148,6 @@
 		CD3AC6EB1D2C0364002B4BB0 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
@@ -222,13 +194,13 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include/ $(PROJECT_DIR)/../include/expect/include/ $(PROJECT_DIR)/../ $(PROJECT_DIR)/../include/";
 			};
 			name = Debug;
 		};
 		CD3AC6EC1D2C0364002B4BB0 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
@@ -268,6 +240,7 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include/ $(PROJECT_DIR)/../include/expect/include/ $(PROJECT_DIR)/../ $(PROJECT_DIR)/../include/";
 			};
 			name = Release;
 		};
@@ -281,7 +254,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ".. ../include";
 			};
 			name = Debug;
 		};
@@ -295,7 +267,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ".. ../include";
 			};
 			name = Release;
 		};

+ 1 - 1
graphics/graphics/material.hpp

@@ -7,7 +7,7 @@
 
 #pragma once
 
-#include "graphics/shader_program.hpp"
+#include "shader_program.hpp"
 
 #include "util/identity.hpp"
 

+ 1 - 1
graphics/graphics/object.hpp

@@ -11,7 +11,7 @@
 #include "math/math_fwd.hpp"
 #include "math/shape.hpp"
 
-#include "graphics/material.hpp"
+#include "material.hpp"
 
 namespace graphics {
   struct bound {

graphics/graphics/shader.hpp → graphics/include/game/graphics/shader.hpp


graphics/graphics/shader_program.hpp → graphics/include/game/graphics/shader_program.hpp


graphics/graphics/texture.hpp → graphics/include/game/graphics/texture.hpp


+ 1 - 1
graphics/graphics/material.cpp

@@ -5,4 +5,4 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "material.hpp"
+#include "game/graphics/material.hpp"

+ 1 - 1
graphics/graphics/object.cpp

@@ -5,4 +5,4 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "object.hpp"
+#include "game/graphics/object.hpp"

+ 1 - 1
graphics/graphics/shader.cpp

@@ -5,4 +5,4 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "shader.hpp"
+#include "game/graphics/shader.hpp"

+ 1 - 1
graphics/graphics/shader_program.cpp

@@ -5,4 +5,4 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "shader_program.hpp"
+#include "game/graphics/shader_program.hpp"

+ 5 - 2
graphics/graphics/texture.cpp

@@ -5,15 +5,18 @@
 //  Created by Sam Jaffe on 7/5/16.
 //
 
-#include "texture.hpp"
+#include "game/graphics/texture.hpp"
 
 #include "scope_guard/scope_guard.hpp"
 
 #include <unordered_map>
 #include <string>
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcomma"
 #define STB_IMAGE_IMPLEMENTATION
-#include "include/stb/stb_image.h"
+#include "stb/stb_image.h"
+#pragma clang diagnostic pop
 
 unsigned char * stbi_load( char const *, int *, int *, int *, int );
 void stbi_image_free( void * );