Anonymous avatar Anonymous committed 0d12eb7

Little more structured code. Requirements of every scene for OpenGL over to separated file. Scene files merged in one folder

Comments (0)

Files changed (4)

CommandLineC/main.c

-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef _WIN64
-    #include <windows.h>
-#elif _WIN32
-    #include <windows.h>
-#elif __APPLE__
-    #include "TargetConditionals.h"
-    #if TARGET_OS_IPHONE
-        // iOS device
-    #elif TARGET_IPHONE_SIMULATOR
-        // iOS Simulator
-    #elif TARGET_OS_MAC
-        #include <GLUT/glut.h>
-    #else
-        // Unsupported platform
-    #endif
-#elif __linux
-    // linux
-#elif __unix // all unices not caught above
-    // Unix
-#elif __posix
-    // POSIX
-#endif
+#include "requirements.h"
 
 // Scenes
 #include "scene1.h"

CommandLineC/requirements.h

+//
+//  requirements.h
+//  OpenGL_no_cocoa
+//
+//  Created by Mareks Ruskuls on 1/12/13.
+//
+//
+
+#ifndef REQUIREMENTS
+#define REQUIREMENTS
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef _WIN64
+#include <windows.h>
+#elif _WIN32
+#include <windows.h>
+#elif __APPLE__
+#include "TargetConditionals.h"
+#if TARGET_OS_IPHONE
+// iOS device
+#elif TARGET_IPHONE_SIMULATOR
+// iOS Simulator
+#elif TARGET_OS_MAC
+#include <GLUT/glut.h>
+#else
+// Unsupported platform
+#endif
+#elif __linux
+// linux
+#elif __unix // all unices not caught above
+// Unix
+#elif __posix
+// POSIX
+#endif
+
+#endif

CommandLineC/scene1.h

 #ifndef SCENE1
 #define SCENE1
 
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef _WIN64
-#include <windows.h>
-#elif _WIN32
-#include <windows.h>
-#elif __APPLE__
-#include "TargetConditionals.h"
-#if TARGET_OS_IPHONE
-// iOS device
-#elif TARGET_IPHONE_SIMULATOR
-// iOS Simulator
-#elif TARGET_OS_MAC
-#include <GLUT/glut.h>
-#else
-// Unsupported platform
-#endif
-#elif __linux
-// linux
-#elif __unix // all unices not caught above
-// Unix
-#elif __posix
-// POSIX
-#endif
-
+#include "requirements.h"
 
 void scene1_display(void);
 void scene1_reshape(int width, int height); 

OpenGL_no_cocoa.xcodeproj/project.pbxproj

 		276FD468169F5EA100711514 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/OpenGL.framework; sourceTree = DEVELOPER_DIR; };
 		276FD46A16A15B5D00711514 /* scene1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scene1.c; sourceTree = "<group>"; };
 		276FD46C16A15C8B00711514 /* scene1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scene1.h; sourceTree = "<group>"; };
+		27AB3F0A16A163F20083B34F /* requirements.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = requirements.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
 			children = (
 				276FD45F169F5E7100711514 /* main.c */,
 				276FD461169F5E7100711514 /* CommandLineC.1 */,
+				27AB3F0C16A164F20083B34F /* scene1 */,
+				27AB3F0A16A163F20083B34F /* requirements.h */,
+			);
+			path = CommandLineC;
+			sourceTree = "<group>";
+		};
+		27AB3F0C16A164F20083B34F /* scene1 */ = {
+			isa = PBXGroup;
+			children = (
 				276FD46A16A15B5D00711514 /* scene1.c */,
 				276FD46C16A15C8B00711514 /* scene1.h */,
 			);
-			path = CommandLineC;
+			name = scene1;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
 				276FD465169F5E7100711514 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
 		};
 /* End XCConfigurationList section */
 	};
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.