diff --git a/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/Contents.json b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..689c82d
--- /dev/null
+++ b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,60 @@
+{
+ "images" : [
+ {
+ "idiom" : "mac",
+ "size" : "16x16",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "16x16",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "32x32",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "32x32",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "128x128",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "128x128",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "256x256",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "mac",
+ "size" : "256x256",
+ "scale" : "2x"
+ },
+ {
+ "size" : "512x512",
+ "idiom" : "mac",
+ "filename" : "icon512.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "512x512",
+ "idiom" : "mac",
+ "filename" : "icon1024.png",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon1024.png b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon1024.png
new file mode 100644
index 0000000..da62a12
Binary files /dev/null and b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon1024.png differ
diff --git a/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon512.png b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon512.png
new file mode 100644
index 0000000..da62a12
Binary files /dev/null and b/PanoPainter-OSX/Assets.xcassets/AppIcon.appiconset/icon512.png differ
diff --git a/PanoPainter-OSX/Assets.xcassets/Contents.json b/PanoPainter-OSX/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..da4a164
--- /dev/null
+++ b/PanoPainter-OSX/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/PanoPainter-OSX/Base.lproj/MainMenu.xib b/PanoPainter-OSX/Base.lproj/MainMenu.xib
new file mode 100644
index 0000000..669bd30
--- /dev/null
+++ b/PanoPainter-OSX/Base.lproj/MainMenu.xib
@@ -0,0 +1,681 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PanoPainter-OSX/Info.plist b/PanoPainter-OSX/Info.plist
new file mode 100644
index 0000000..6c1dec7
--- /dev/null
+++ b/PanoPainter-OSX/Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSApplicationCategoryType
+ public.app-category.graphics-design
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSHumanReadableCopyright
+ Copyright © 2017 Omar Mohamed Ali Mudhir. All rights reserved.
+ NSMainNibFile
+
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/PanoPainter-OSX/main.cpp b/PanoPainter-OSX/main.cpp
new file mode 100644
index 0000000..c454671
--- /dev/null
+++ b/PanoPainter-OSX/main.cpp
@@ -0,0 +1,364 @@
+#include "pch.h"
+#include "log.h"
+#include "shader.h"
+#include "shape.h"
+#include "texture.h"
+#include "image.h"
+#include "app.h"
+#include "keymap.h"
+#include
+#include
+#include
+#include
+
+@interface View : NSOpenGLView
+{
+ CVDisplayLinkRef dl;
+}
+- (void)terminateGL;
+@end @implementation View
+- (instancetype)initWithFrame:(NSRect)frameRect
+{
+ NSOpenGLPixelFormatAttribute attrs[] =
+ {
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFADepthSize, 24,
+ // Must specify the 3.2 Core Profile to use OpenGL 3.2
+ NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
+ // Multisample
+ NSOpenGLPFAMultisample,
+ NSOpenGLPFASamples, 2,
+ NSOpenGLPFASampleBuffers, 1,
+ 0
+ };
+ NSOpenGLPixelFormat *pf = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
+ NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat:pf shareContext:nil];
+ self = [super initWithFrame:frameRect pixelFormat:pf];
+ [self setPixelFormat:pf];
+ [self setOpenGLContext:context];
+ return self;
+}
+- (void)prepareOpenGL
+{
+ NSLog(@"prepare");
+
+ // Synchronize buffer swaps with vertical refresh rate
+ GLint swapInt = 1;
+ [[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
+
+ // Create a display link capable of being used with all active displays
+ CVDisplayLinkCreateWithActiveCGDisplays(&dl);
+
+ // Set the renderer output callback function
+ CVDisplayLinkSetOutputCallback(dl, &MyDisplayLinkCallback, (__bridge void*)self);
+
+ // Set the display link for the current renderer
+ CGLContextObj cglContext = [[self openGLContext] CGLContextObj];
+ CGLPixelFormatObj cglPixelFormat = [[self pixelFormat] CGLPixelFormatObj];
+ CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(dl, cglContext, cglPixelFormat);
+
+ // Activate the display link
+ CVDisplayLinkStart(dl);
+
+ CGLEnable([self.openGLContext CGLContextObj], kCGLCECrashOnRemovedFunctions);
+
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ App::I.init();
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+
+- (void)terminateGL
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ CVDisplayLinkRelease(dl);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+
+// This is the renderer output callback function
+static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now,
+ const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext)
+{
+ CVReturn result = [(__bridge View*)displayLinkContext getFrameForTime:outputTime];
+ return result;
+}
+
+- (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime
+{
+ static double _timeFreq = CVGetHostClockFrequency();
+ static double _prevTime = (double)outputTime->hostTime / _timeFreq;
+ double hostTime = (double)outputTime->hostTime;
+ double now = hostTime / _timeFreq;
+
+ // this will not update unless 1/30th of a second has passed since the last update
+ if ( now < _prevTime + (1.0 / 30.0) )
+ {
+ // Add your drawing codes here
+ [[self openGLContext] makeCurrentContext];
+
+ // We draw on a secondary thread through the display link
+ // When resizing the view, -reshape is called automatically on the main
+ // thread. Add a mutex around to avoid the threads accessing the context
+ // simultaneously when resizing
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ App::I.clear();
+ App::I.update(now - _prevTime);
+
+ //[[self openGLContext] flushBuffer];
+ // returning NO will cause the layer to NOT be redrawn
+
+ CGLFlushDrawable([[self openGLContext] CGLContextObj]);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+ return NO;
+ }
+ else
+ {
+ // change whatever you want to change here, as a function of time elapsed
+ _prevTime = now;
+ // return YES to have your layer redrawn
+ return YES;
+ }
+
+ return kCVReturnSuccess;
+}
+
+- (void)dealloc
+{
+ // Release the display link
+ CVDisplayLinkRelease(dl);
+}
+
+- (void)drawRect:(NSRect)dirtyRect
+{
+ NSLog(@"drawRect");
+ // Add your drawing codes here
+ [[self openGLContext] makeCurrentContext];
+
+ // We draw on a secondary thread through the display link
+ // When resizing the view, -reshape is called automatically on the main
+ // thread. Add a mutex around to avoid the threads accessing the context
+ // simultaneously when resizing
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ App::I.update(0);
+
+ //[[self openGLContext] flushBuffer];
+ // returning NO will cause the layer to NOT be redrawn
+
+ CGLFlushDrawable([[self openGLContext] CGLContextObj]);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+
+- (void)reshape
+{
+ [super reshape];
+
+ // We draw on a secondary thread through the display link. However, when
+ // resizing the view, -drawRect is called on the main thread.
+ // Add a mutex around to avoid the threads accessing the context
+ // simultaneously when resizing.
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+
+ // Get the view size in Points
+ NSRect viewRectPoints = [self bounds];
+
+#if SUPPORT_RETINA_RESOLUTION
+
+ // Rendering at retina resolutions will reduce aliasing, but at the potential
+ // cost of framerate and battery life due to the GPU needing to render more
+ // pixels.
+
+ // Any calculations the renderer does which use pixel dimentions, must be
+ // in "retina" space. [NSView convertRectToBacking] converts point sizes
+ // to pixel sizes. Thus the renderer gets the size in pixels, not points,
+ // so that it can set it's viewport and perform and other pixel based
+ // calculations appropriately.
+ // viewRectPixels will be larger than viewRectPoints for retina displays.
+ // viewRectPixels will be the same as viewRectPoints for non-retina displays
+ NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];
+
+#else //if !SUPPORT_RETINA_RESOLUTION
+
+ // App will typically render faster and use less power rendering at
+ // non-retina resolutions since the GPU needs to render less pixels.
+ // There is the cost of more aliasing, but it will be no-worse than
+ // on a Mac without a retina display.
+
+ // Points:Pixels is always 1:1 when not supporting retina resolutions
+ NSRect viewRectPixels = viewRectPoints;
+
+#endif // !SUPPORT_RETINA_RESOLUTION
+ App::I.resize(viewRectPixels.size.width, viewRectPixels.size.height);
+
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)renewGState
+{
+ // Called whenever graphics state updated (such as window resize)
+
+ // OpenGL rendering is not synchronous with other rendering on the OSX.
+ // Therefore, call disableScreenUpdatesUntilFlush so the window server
+ // doesn't render non-OpenGL content in the window asynchronously from
+ // OpenGL content, which could cause flickering. (non-OpenGL content
+ // includes the title bar and drawing done by the app with other APIs)
+ [[self window] disableScreenUpdatesUntilFlush];
+
+ [super renewGState];
+}
+- (void)mouseDown:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_down(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)rightMouseDown:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_down(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)mouseUp:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_up(0, mouseLoc.x, App::I.height - mouseLoc.y - 1);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)rightMouseUp:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_up(1, mouseLoc.x, App::I.height - mouseLoc.y - 1);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)mouseMoved:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+-(void)mouseDragged:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)rightMouseDragged:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)scrollWheel:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ App::I.mouse_scroll(mouseLoc.x, App::I.height - mouseLoc.y - 1, [theEvent deltaY]);
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)keyDown:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto keyCode = [theEvent keyCode];
+ auto chars = [theEvent characters];
+ App::I.key_down(convert_key(keyCode));
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+- (void)keyUp:(NSEvent *)theEvent
+{
+ CGLLockContext([[self openGLContext] CGLContextObj]);
+ auto keyCode = [theEvent keyCode];
+ auto chars = [theEvent characters];
+ App::I.key_up(convert_key(keyCode));
+ CGLUnlockContext([[self openGLContext] CGLContextObj]);
+}
+@end
+
+@interface Window : NSWindow
+@end @implementation Window
+- (void)keyDown:(NSEvent *)theEvent
+{
+ [[self windowController] keyDown:theEvent];
+}
+@end
+
+@interface Controller : NSWindowController
+@end @implementation Controller
+- (void)keyDown:(NSEvent *)theEvent
+{
+ unichar c = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
+ if (c == 27)
+ {
+ [[NSApplication sharedApplication] terminate:nil];
+ }
+}
+- (void)windowDidResize:(NSNotification *)notification
+{
+
+}
+@end
+
+@interface AppOSX : NSApplication
+{
+ Window* window;
+ Controller* controller;
+ View* view;
+}
+@end @implementation AppOSX
+- (instancetype)init
+{
+ self = [super init];
+ [self setActivationPolicy:NSApplicationActivationPolicyRegular]; // make it to the front
+ [self setDelegate:self];
+ return self;
+}
+- (void)applicationWillTerminate:(NSNotification *)notification
+{
+ [view terminateGL];
+ [window close];
+}
+- (void)applicationDidFinishLaunching:(NSNotification *)notification
+{
+ App::I.initLog();
+ App::I.create();
+ NSRect r = NSMakeRect(0, 0, App::I.width, App::I.height);
+
+ view = [[View alloc] initWithFrame:r];
+
+ auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask;
+ window = [[Window alloc] initWithContentRect:r styleMask:style backing:NSBackingStoreBuffered defer:NO];
+ [window setTitle:@"PanoPainter 0.1.2 alpha"];
+ [window center];
+ [window makeKeyAndOrderFront:controller];
+ [window setContentView:view];
+ [window setAcceptsMouseMovedEvents:true];
+ [window makeFirstResponder:view];
+
+ controller = [[Controller alloc] initWithWindow:window];
+
+ auto menubar = [NSMenu new];
+ auto appMenuItem = [NSMenuItem new];
+ [menubar addItem:appMenuItem];
+ [self setMainMenu:menubar];
+
+ auto appMenu = [NSMenu new];
+ auto appName = [[NSProcessInfo processInfo] processName];
+ auto quitTitle = [@"Quit " stringByAppendingString:appName];
+ auto quitMenuItem = [[NSMenuItem alloc] initWithTitle:quitTitle
+ action:@selector(terminate:) keyEquivalent:@"q"];
+ [appMenu addItem:quitMenuItem];
+ [appMenuItem setSubmenu:appMenu];
+
+ NSLog(@"app launched");
+}
+@end
+
+int main(int argc, const char * argv[])
+{
+ AppOSX* app = [AppOSX sharedApplication];
+ [app run];
+ return 0;
+}
diff --git a/engine.xcodeproj/project.pbxproj b/engine.xcodeproj/project.pbxproj
index 4cf7c4f..ddf1da2 100644
--- a/engine.xcodeproj/project.pbxproj
+++ b/engine.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ AD02F0C21EDC456800B2E692 /* sequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD02F0C01EDC456800B2E692 /* sequencer.cpp */; };
+ AD02F0C31EDC457C00B2E692 /* sequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD02F0C01EDC456800B2E692 /* sequencer.cpp */; };
+ AD02F0C41EDC457C00B2E692 /* sequencer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD02F0C01EDC456800B2E692 /* sequencer.cpp */; };
AD0E11971ECA20F200CDA6BB /* app_events.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11921ECA20F200CDA6BB /* app_events.cpp */; };
AD0E11981ECA20F200CDA6BB /* app_layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11931ECA20F200CDA6BB /* app_layout.cpp */; };
AD0E11991ECA20F200CDA6BB /* app_shaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11941ECA20F200CDA6BB /* app_shaders.cpp */; };
@@ -19,6 +22,65 @@
AD0E11A31ECA61B500CDA6BB /* jpge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11A21ECA61B500CDA6BB /* jpge.cpp */; };
AD0E11A41ECA61B900CDA6BB /* jpge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11A21ECA61B500CDA6BB /* jpge.cpp */; };
AD0E11A51ECA61B900CDA6BB /* jpgd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E119F1ECA619F00CDA6BB /* jpgd.cpp */; };
+ AD0E5CA31ECC6F2B00C35669 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E5CA21ECC6F2B00C35669 /* main.cpp */; };
+ AD0E5CA51ECC6F2B00C35669 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AD0E5CA41ECC6F2B00C35669 /* Assets.xcassets */; };
+ AD0E5CA81ECC6F2B00C35669 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD0E5CA61ECC6F2B00C35669 /* MainMenu.xib */; };
+ AD0E5CAD1ECC724D00C35669 /* libcurl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = AD8CF7221E914DE400083FFD /* libcurl.tbd */; };
+ AD0E5CAE1ECC725400C35669 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05F1E12DA86006ACC15 /* CoreVideo.framework */; };
+ AD0E5CAF1ECC726000C35669 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05D1E10754F006ACC15 /* CoreFoundation.framework */; };
+ AD0E5CB01ECC726400C35669 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05B1E107536006ACC15 /* Cocoa.framework */; };
+ AD0E5CB11ECC726C00C35669 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E0591E10752E006ACC15 /* OpenGL.framework */; };
+ AD0E5CB21ECC72AD00C35669 /* jpge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11A21ECA61B500CDA6BB /* jpge.cpp */; };
+ AD0E5CB31ECC72AD00C35669 /* jpgd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E119F1ECA619F00CDA6BB /* jpgd.cpp */; };
+ AD0E5CB41ECC72AD00C35669 /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0781E342205006ACC15 /* tinyxml2.cpp */; };
+ AD0E5CB51ECC72AD00C35669 /* YGNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0741E3421F2006ACC15 /* YGNodeList.c */; };
+ AD0E5CB61ECC72AD00C35669 /* Yoga.c in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0751E3421F2006ACC15 /* Yoga.c */; };
+ AD0E5CB71ECC72AD00C35669 /* layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD3B1EBE1E3B8B7600E918E3 /* layout.cpp */; };
+ AD0E5CB81ECC72AD00C35669 /* node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10637D1EC7ADFA002A525F /* node.cpp */; };
+ AD0E5CB91ECC72AD00C35669 /* node_border.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063511EC7ADFA002A525F /* node_border.cpp */; };
+ AD0E5CBA1ECC72AD00C35669 /* node_button_custom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063531EC7ADFA002A525F /* node_button_custom.cpp */; };
+ AD0E5CBB1ECC72AD00C35669 /* node_button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063551EC7ADFA002A525F /* node_button.cpp */; };
+ AD0E5CBC1ECC72AD00C35669 /* node_canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063571EC7ADFA002A525F /* node_canvas.cpp */; };
+ AD0E5CBD1ECC72AD00C35669 /* node_checkbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063591EC7ADFA002A525F /* node_checkbox.cpp */; };
+ AD0E5CBE1ECC72AD00C35669 /* node_color_quad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10635B1EC7ADFA002A525F /* node_color_quad.cpp */; };
+ AD0E5CBF1ECC72AD00C35669 /* node_dialog_open.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10635D1EC7ADFA002A525F /* node_dialog_open.cpp */; };
+ AD0E5CC01ECC72AD00C35669 /* node_icon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10635F1EC7ADFA002A525F /* node_icon.cpp */; };
+ AD0E5CC11ECC72AD00C35669 /* node_image_texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063611EC7ADFA002A525F /* node_image_texture.cpp */; };
+ AD0E5CC21ECC72AD00C35669 /* node_image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063631EC7ADFA002A525F /* node_image.cpp */; };
+ AD0E5CC31ECC72AD00C35669 /* node_message_box.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063651EC7ADFA002A525F /* node_message_box.cpp */; };
+ AD0E5CC41ECC72AD00C35669 /* node_panel_brush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063671EC7ADFA002A525F /* node_panel_brush.cpp */; };
+ AD0E5CC51ECC72AD00C35669 /* node_panel_color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063691EC7ADFA002A525F /* node_panel_color.cpp */; };
+ AD0E5CC61ECC72AD00C35669 /* node_panel_layer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10636B1EC7ADFA002A525F /* node_panel_layer.cpp */; };
+ AD0E5CC71ECC72AD00C35669 /* node_panel_stroke.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10636D1EC7ADFA002A525F /* node_panel_stroke.cpp */; };
+ AD0E5CC81ECC72AD00C35669 /* node_popup_menu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10636F1EC7ADFA002A525F /* node_popup_menu.cpp */; };
+ AD0E5CC91ECC72AD00C35669 /* node_settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063711EC7ADFA002A525F /* node_settings.cpp */; };
+ AD0E5CCA1ECC72AD00C35669 /* node_slider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063731EC7ADFA002A525F /* node_slider.cpp */; };
+ AD0E5CCB1ECC72AD00C35669 /* node_scroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11951ECA20F200CDA6BB /* node_scroll.cpp */; };
+ AD0E5CCC1ECC72AD00C35669 /* node_stroke_preview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063751EC7ADFA002A525F /* node_stroke_preview.cpp */; };
+ AD0E5CCD1ECC72AD00C35669 /* node_text_input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063771EC7ADFA002A525F /* node_text_input.cpp */; };
+ AD0E5CCE1ECC72AD00C35669 /* node_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063791EC7ADFA002A525F /* node_text.cpp */; };
+ AD0E5CCF1ECC72AD00C35669 /* node_viewport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD10637B1EC7ADFA002A525F /* node_viewport.cpp */; };
+ AD0E5CD01ECC72AD00C35669 /* action.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD29CC601EA2B214008C8BFA /* action.cpp */; };
+ AD0E5CD11ECC72AD00C35669 /* app.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0701E2A90EF006ACC15 /* app.cpp */; };
+ AD0E5CD21ECC72AD00C35669 /* app_events.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11921ECA20F200CDA6BB /* app_events.cpp */; };
+ AD0E5CD31ECC72AD00C35669 /* app_layout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11931ECA20F200CDA6BB /* app_layout.cpp */; };
+ AD0E5CD41ECC72AD00C35669 /* app_shaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD0E11941ECA20F200CDA6BB /* app_shaders.cpp */; };
+ AD0E5CD51ECC72AD00C35669 /* asset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08CF1E89BD0F0051D85F /* asset.cpp */; };
+ AD0E5CD61ECC72AD00C35669 /* bezier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D11E89BD0F0051D85F /* bezier.cpp */; };
+ AD0E5CD71ECC72AD00C35669 /* brush.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D31E89BD0F0051D85F /* brush.cpp */; };
+ AD0E5CD81ECC72AD00C35669 /* canvas_modes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD744B6C1EBC9EF700B66E30 /* canvas_modes.cpp */; };
+ AD0E5CD91ECC72AD00C35669 /* canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D51E89BD0F0051D85F /* canvas.cpp */; };
+ AD0E5CDA1ECC72AD00C35669 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADB1C3D81EA3A156009A65BD /* event.cpp */; };
+ AD0E5CDB1ECC72AD00C35669 /* font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD95AEC31E41EDEC002DD03A /* font.cpp */; };
+ AD0E5CDC1ECC72AD00C35669 /* image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0661E2A7741006ACC15 /* image.cpp */; };
+ AD0E5CDD1ECC72AD00C35669 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD8CF71F1E913F0500083FFD /* log.cpp */; };
+ AD0E5CDE1ECC72AD00C35669 /* pch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD95AEC51E41EDEC002DD03A /* pch.cpp */; };
+ AD0E5CDF1ECC72AD00C35669 /* rtt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D71E89BD0F0051D85F /* rtt.cpp */; };
+ AD0E5CE01ECC72AD00C35669 /* shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0631E2A76FD006ACC15 /* shader.cpp */; };
+ AD0E5CE11ECC72AD00C35669 /* shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E06D1E2A80BC006ACC15 /* shape.cpp */; };
+ AD0E5CE21ECC72AD00C35669 /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0691E2A774F006ACC15 /* texture.cpp */; };
+ AD0E5CE31ECC72AD00C35669 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADB61C801E3D38450093280F /* util.cpp */; };
+ AD0E5CE41ECC76BA00C35669 /* data in Resources */ = {isa = PBXBuildFile; fileRef = AD58E0611E17F23D006ACC15 /* data */; };
AD10637F1EC7ADFA002A525F /* node_border.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063511EC7ADFA002A525F /* node_border.cpp */; };
AD1063801EC7ADFA002A525F /* node_button_custom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063531EC7ADFA002A525F /* node_button_custom.cpp */; };
AD1063811EC7ADFA002A525F /* node_button.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1063551EC7ADFA002A525F /* node_button.cpp */; };
@@ -146,6 +208,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ AD02F0C01EDC456800B2E692 /* sequencer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sequencer.cpp; sourceTree = ""; };
+ AD02F0C11EDC456800B2E692 /* sequencer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sequencer.h; sourceTree = ""; };
AD0E11921ECA20F200CDA6BB /* app_events.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = app_events.cpp; sourceTree = ""; };
AD0E11931ECA20F200CDA6BB /* app_layout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = app_layout.cpp; sourceTree = ""; };
AD0E11941ECA20F200CDA6BB /* app_shaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = app_shaders.cpp; sourceTree = ""; };
@@ -153,6 +217,11 @@
AD0E11961ECA20F200CDA6BB /* node_scroll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = node_scroll.h; sourceTree = ""; };
AD0E119F1ECA619F00CDA6BB /* jpgd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jpgd.cpp; path = libs/jpeg/jpgd.cpp; sourceTree = ""; };
AD0E11A21ECA61B500CDA6BB /* jpge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = jpge.cpp; path = libs/jpeg/jpge.cpp; sourceTree = ""; };
+ AD0E5C9C1ECC6F2B00C35669 /* PanoPainter-OSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PanoPainter-OSX.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ AD0E5CA21ECC6F2B00C35669 /* main.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = main.cpp; sourceTree = ""; };
+ AD0E5CA41ECC6F2B00C35669 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ AD0E5CA71ECC6F2B00C35669 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
+ AD0E5CA91ECC6F2B00C35669 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
AD1063511EC7ADFA002A525F /* node_border.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = node_border.cpp; sourceTree = ""; };
AD1063521EC7ADFA002A525F /* node_border.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = node_border.h; sourceTree = ""; };
AD1063531EC7ADFA002A525F /* node_button_custom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = node_button_custom.cpp; sourceTree = ""; };
@@ -268,6 +337,18 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ AD0E5C991ECC6F2B00C35669 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AD0E5CB11ECC726C00C35669 /* OpenGL.framework in Frameworks */,
+ AD0E5CB01ECC726400C35669 /* Cocoa.framework in Frameworks */,
+ AD0E5CAF1ECC726000C35669 /* CoreFoundation.framework in Frameworks */,
+ AD0E5CAE1ECC725400C35669 /* CoreVideo.framework in Frameworks */,
+ AD0E5CAD1ECC724D00C35669 /* libcurl.tbd in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
AD58E04C1E107411006ACC15 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -298,6 +379,25 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ AD0E5C9D1ECC6F2B00C35669 /* PanoPainter-OSX */ = {
+ isa = PBXGroup;
+ children = (
+ AD0E5CA41ECC6F2B00C35669 /* Assets.xcassets */,
+ AD0E5CA61ECC6F2B00C35669 /* MainMenu.xib */,
+ AD0E5CA91ECC6F2B00C35669 /* Info.plist */,
+ AD0E5CA11ECC6F2B00C35669 /* Supporting Files */,
+ );
+ path = "PanoPainter-OSX";
+ sourceTree = "";
+ };
+ AD0E5CA11ECC6F2B00C35669 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ AD0E5CA21ECC6F2B00C35669 /* main.cpp */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
AD1063501EC7ADDE002A525F /* ui */ = {
isa = PBXGroup;
children = (
@@ -375,6 +475,7 @@
AD58E0591E10752E006ACC15 /* OpenGL.framework */,
AD58E0511E107411006ACC15 /* engine */,
ADD7D26C1EBF9AE300D5A897 /* PanoPainter */,
+ AD0E5C9D1ECC6F2B00C35669 /* PanoPainter-OSX */,
AD58E0501E107411006ACC15 /* Products */,
);
sourceTree = "";
@@ -384,6 +485,7 @@
children = (
AD58E04F1E107411006ACC15 /* engine */,
ADD7D26B1EBF9AE300D5A897 /* PanoPainter.app */,
+ AD0E5C9C1ECC6F2B00C35669 /* PanoPainter-OSX.app */,
);
name = Products;
sourceTree = "";
@@ -422,6 +524,8 @@
AD58E06C1E2A78BD006ACC15 /* pch.h */,
AD4C08D71E89BD0F0051D85F /* rtt.cpp */,
AD4C08D81E89BD0F0051D85F /* rtt.h */,
+ AD02F0C01EDC456800B2E692 /* sequencer.cpp */,
+ AD02F0C11EDC456800B2E692 /* sequencer.h */,
AD58E0631E2A76FD006ACC15 /* shader.cpp */,
AD58E0641E2A76FD006ACC15 /* shader.h */,
AD58E06D1E2A80BC006ACC15 /* shape.cpp */,
@@ -474,6 +578,23 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
+ AD0E5C9B1ECC6F2B00C35669 /* PanoPainter-OSX */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AD0E5CAC1ECC6F2B00C35669 /* Build configuration list for PBXNativeTarget "PanoPainter-OSX" */;
+ buildPhases = (
+ AD0E5C981ECC6F2B00C35669 /* Sources */,
+ AD0E5C991ECC6F2B00C35669 /* Frameworks */,
+ AD0E5C9A1ECC6F2B00C35669 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "PanoPainter-OSX";
+ productName = "PanoPainter-OSX";
+ productReference = AD0E5C9C1ECC6F2B00C35669 /* PanoPainter-OSX.app */;
+ productType = "com.apple.product-type.application";
+ };
AD58E04E1E107411006ACC15 /* engine */ = {
isa = PBXNativeTarget;
buildConfigurationList = AD58E0561E107411006ACC15 /* Build configuration list for PBXNativeTarget "engine" */;
@@ -517,6 +638,9 @@
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Omar Mohamed Ali Mudhir";
TargetAttributes = {
+ AD0E5C9B1ECC6F2B00C35669 = {
+ CreatedOnToolsVersion = 7.2;
+ };
AD58E04E1E107411006ACC15 = {
CreatedOnToolsVersion = 7.2;
};
@@ -540,11 +664,22 @@
targets = (
AD58E04E1E107411006ACC15 /* engine */,
ADD7D26A1EBF9AE300D5A897 /* PanoPainter */,
+ AD0E5C9B1ECC6F2B00C35669 /* PanoPainter-OSX */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ AD0E5C9A1ECC6F2B00C35669 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AD0E5CE41ECC76BA00C35669 /* data in Resources */,
+ AD0E5CA51ECC6F2B00C35669 /* Assets.xcassets in Resources */,
+ AD0E5CA81ECC6F2B00C35669 /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
ADD7D2691EBF9AE300D5A897 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -559,6 +694,65 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ AD0E5C981ECC6F2B00C35669 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AD0E5CB91ECC72AD00C35669 /* node_border.cpp in Sources */,
+ AD0E5CC81ECC72AD00C35669 /* node_popup_menu.cpp in Sources */,
+ AD0E5CB71ECC72AD00C35669 /* layout.cpp in Sources */,
+ AD0E5CB41ECC72AD00C35669 /* tinyxml2.cpp in Sources */,
+ AD0E5CD81ECC72AD00C35669 /* canvas_modes.cpp in Sources */,
+ AD0E5CA31ECC6F2B00C35669 /* main.cpp in Sources */,
+ AD0E5CB21ECC72AD00C35669 /* jpge.cpp in Sources */,
+ AD0E5CD21ECC72AD00C35669 /* app_events.cpp in Sources */,
+ AD0E5CD11ECC72AD00C35669 /* app.cpp in Sources */,
+ AD0E5CC21ECC72AD00C35669 /* node_image.cpp in Sources */,
+ AD0E5CDB1ECC72AD00C35669 /* font.cpp in Sources */,
+ AD0E5CDA1ECC72AD00C35669 /* event.cpp in Sources */,
+ AD0E5CCB1ECC72AD00C35669 /* node_scroll.cpp in Sources */,
+ AD0E5CBF1ECC72AD00C35669 /* node_dialog_open.cpp in Sources */,
+ AD0E5CE31ECC72AD00C35669 /* util.cpp in Sources */,
+ AD0E5CD51ECC72AD00C35669 /* asset.cpp in Sources */,
+ AD0E5CCA1ECC72AD00C35669 /* node_slider.cpp in Sources */,
+ AD0E5CCE1ECC72AD00C35669 /* node_text.cpp in Sources */,
+ AD0E5CDC1ECC72AD00C35669 /* image.cpp in Sources */,
+ AD0E5CE01ECC72AD00C35669 /* shader.cpp in Sources */,
+ AD0E5CDD1ECC72AD00C35669 /* log.cpp in Sources */,
+ AD0E5CD61ECC72AD00C35669 /* bezier.cpp in Sources */,
+ AD0E5CB61ECC72AD00C35669 /* Yoga.c in Sources */,
+ AD0E5CC51ECC72AD00C35669 /* node_panel_color.cpp in Sources */,
+ AD0E5CD71ECC72AD00C35669 /* brush.cpp in Sources */,
+ AD0E5CBE1ECC72AD00C35669 /* node_color_quad.cpp in Sources */,
+ AD0E5CB51ECC72AD00C35669 /* YGNodeList.c in Sources */,
+ AD0E5CE11ECC72AD00C35669 /* shape.cpp in Sources */,
+ AD0E5CDF1ECC72AD00C35669 /* rtt.cpp in Sources */,
+ AD02F0C41EDC457C00B2E692 /* sequencer.cpp in Sources */,
+ AD0E5CCD1ECC72AD00C35669 /* node_text_input.cpp in Sources */,
+ AD0E5CE21ECC72AD00C35669 /* texture.cpp in Sources */,
+ AD0E5CCC1ECC72AD00C35669 /* node_stroke_preview.cpp in Sources */,
+ AD0E5CDE1ECC72AD00C35669 /* pch.cpp in Sources */,
+ AD0E5CCF1ECC72AD00C35669 /* node_viewport.cpp in Sources */,
+ AD0E5CB31ECC72AD00C35669 /* jpgd.cpp in Sources */,
+ AD0E5CD31ECC72AD00C35669 /* app_layout.cpp in Sources */,
+ AD0E5CC71ECC72AD00C35669 /* node_panel_stroke.cpp in Sources */,
+ AD0E5CC61ECC72AD00C35669 /* node_panel_layer.cpp in Sources */,
+ AD0E5CBA1ECC72AD00C35669 /* node_button_custom.cpp in Sources */,
+ AD0E5CC31ECC72AD00C35669 /* node_message_box.cpp in Sources */,
+ AD0E5CC41ECC72AD00C35669 /* node_panel_brush.cpp in Sources */,
+ AD0E5CBC1ECC72AD00C35669 /* node_canvas.cpp in Sources */,
+ AD0E5CD01ECC72AD00C35669 /* action.cpp in Sources */,
+ AD0E5CC01ECC72AD00C35669 /* node_icon.cpp in Sources */,
+ AD0E5CC11ECC72AD00C35669 /* node_image_texture.cpp in Sources */,
+ AD0E5CBD1ECC72AD00C35669 /* node_checkbox.cpp in Sources */,
+ AD0E5CC91ECC72AD00C35669 /* node_settings.cpp in Sources */,
+ AD0E5CBB1ECC72AD00C35669 /* node_button.cpp in Sources */,
+ AD0E5CD41ECC72AD00C35669 /* app_shaders.cpp in Sources */,
+ AD0E5CD91ECC72AD00C35669 /* canvas.cpp in Sources */,
+ AD0E5CB81ECC72AD00C35669 /* node.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
AD58E04B1E107411006ACC15 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -592,6 +786,7 @@
AD1063831EC7ADFA002A525F /* node_checkbox.cpp in Sources */,
AD3B1EC01E3B8B7600E918E3 /* layout.cpp in Sources */,
AD58E0721E2A90EF006ACC15 /* app.cpp in Sources */,
+ AD02F0C21EDC456800B2E692 /* sequencer.cpp in Sources */,
AD4C08DC1E89BD0F0051D85F /* canvas.cpp in Sources */,
AD95AEC61E41EDEC002DD03A /* font.cpp in Sources */,
AD1063911EC7ADFA002A525F /* node_stroke_preview.cpp in Sources */,
@@ -669,6 +864,7 @@
ADD7D2A11EBF9E1C00D5A897 /* texture.cpp in Sources */,
AD0E119C1ECA215600CDA6BB /* app_events.cpp in Sources */,
ADD7D2961EBF9E1C00D5A897 /* brush.cpp in Sources */,
+ AD02F0C31EDC457C00B2E692 /* sequencer.cpp in Sources */,
AD1063A51EC7AE92002A525F /* node_panel_stroke.cpp in Sources */,
ADD7D2911EBF9E1C00D5A897 /* event.cpp in Sources */,
ADD7D2A41EBFA06F00D5A897 /* YGNodeList.c in Sources */,
@@ -681,6 +877,14 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
+ AD0E5CA61ECC6F2B00C35669 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ AD0E5CA71ECC6F2B00C35669 /* Base */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "";
+ };
ADD7D27A1EBF9AE300D5A897 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
@@ -700,6 +904,34 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ AD0E5CAA1ECC6F2B00C35669 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_ENABLE_MODULES = NO;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = "PanoPainter-OSX/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.omixlab.PanoPainter-OSX";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ AD0E5CAB1ECC6F2B00C35669 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_CXX_LANGUAGE_STANDARD = "c++14";
+ CLANG_ENABLE_MODULES = NO;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = "PanoPainter-OSX/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.omixlab.PanoPainter-OSX";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
AD58E0541E107411006ACC15 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -858,6 +1090,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ AD0E5CAC1ECC6F2B00C35669 /* Build configuration list for PBXNativeTarget "PanoPainter-OSX" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AD0E5CAA1ECC6F2B00C35669 /* Debug */,
+ AD0E5CAB1ECC6F2B00C35669 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
AD58E04A1E107411006ACC15 /* Build configuration list for PBXProject "engine" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/engine.xcodeproj/xcuserdata/omimac.xcuserdatad/xcschemes/xcschememanagement.plist b/engine.xcodeproj/xcuserdata/omimac.xcuserdatad/xcschemes/xcschememanagement.plist
index 914f5d1..91804c0 100644
--- a/engine.xcodeproj/xcuserdata/omimac.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/engine.xcodeproj/xcuserdata/omimac.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -4,6 +4,16 @@
SchemeUserState
+ PanoPainter-OSX.xcscheme
+
+ orderHint
+ 2
+
+ PanoPainter.xcscheme
+
+ orderHint
+ 1
+
engine.xcscheme
orderHint
@@ -12,6 +22,11 @@
SuppressBuildableAutocreation
+ AD0E5C9B1ECC6F2B00C35669
+
+ primary
+
+
AD58E04E1E107411006ACC15
primary
diff --git a/engine/asset.cpp b/engine/asset.cpp
index 4565b26..54d8fa8 100644
--- a/engine/asset.cpp
+++ b/engine/asset.cpp
@@ -2,7 +2,7 @@
#include "log.h"
#include "asset.h"
-#ifdef __IOS__
+#ifdef __APPLE__
#include
#endif
@@ -24,11 +24,12 @@ bool Asset::open(const char* path)
m_len = (int)AAsset_getLength(m_asset);
m_data = (uint8_t*)AAsset_getBuffer(m_asset);
#else
-#ifdef __IOS__
- NSString* bundle_path = [[NSBundle mainBundle] bundlePath];
+#ifdef __APPLE__
+ NSString* bundle_path = [[NSBundle mainBundle] resourcePath];
std::string base = [bundle_path cStringUsingEncoding:1];
file_path = base + "/" + path;
#endif
+ LOG("asset file: %s", file_path.c_str());
if (!(m_fp = fopen(file_path.c_str(), "rb")))
{
LOG("errno = %d", errno);
diff --git a/engine/layout.cpp b/engine/layout.cpp
index 1727a9f..e2f0c63 100644
--- a/engine/layout.cpp
+++ b/engine/layout.cpp
@@ -8,16 +8,16 @@
bool LayoutManager::load(const char* path)
{
-// if (m_loaded)
-// return true; // already loaded
+ if (m_loaded)
+ return true; // already loaded
#if !defined(__ANDROID__)
- struct stat tmp_info;
- if (stat(path, &tmp_info) != 0)
- return false;
- if (tmp_info.st_mtime <= m_file_info.st_mtime)
- return false;
- m_file_info = tmp_info;
+// struct stat tmp_info;
+// if (stat(path, &tmp_info) != 0)
+// return false;
+// if (tmp_info.st_mtime <= m_file_info.st_mtime)
+// return false;
+// m_file_info = tmp_info;
#endif // __ANDROID__
m_path = path;
@@ -31,7 +31,12 @@ bool LayoutManager::load(const char* path)
auto ret = xml.Parse((char*)file.m_data, file.m_len);
file.close();
if (ret != tinyxml2::XMLError::XML_SUCCESS)
+ {
return false;
+ LOG("parsing xml failed");
+ }
+
+ LOG("parsing loaded xml");
tinyxml2::XMLElement* current = xml.RootElement()->FirstChildElement();
while (current)
diff --git a/engine/log.cpp b/engine/log.cpp
index beb4fc8..3891bd9 100644
--- a/engine/log.cpp
+++ b/engine/log.cpp
@@ -17,7 +17,9 @@ void LogRemote::start()
m_running = true;
m_thread = std::thread([&] {
+#ifdef _WIN32
BT_SetTerminate();
+#endif
net_init();
auto session_string = net_request("/start");
m_session = atoi(session_string.c_str());
diff --git a/engine/main.cpp b/engine/main.cpp
index 3fd9413..b0b199b 100644
--- a/engine/main.cpp
+++ b/engine/main.cpp
@@ -7,354 +7,6 @@
#include "app.h"
#include "keymap.h"
-#ifdef __APPLE__
-
-#ifdef TARGET_OS_OSX
-#include
-#include
-#include
-#include
-@interface View : NSOpenGLView
-{
- CVDisplayLinkRef dl;
-}
-@end @implementation View
-- (instancetype)initWithFrame:(NSRect)frameRect
-{
- NSOpenGLPixelFormatAttribute attrs[] =
- {
- NSOpenGLPFADoubleBuffer,
- NSOpenGLPFADepthSize, 24,
- // Must specify the 3.2 Core Profile to use OpenGL 3.2
- NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
- // Multisample
- NSOpenGLPFAMultisample,
- NSOpenGLPFASamples, 2,
- NSOpenGLPFASampleBuffers, 1,
- 0
- };
- NSOpenGLPixelFormat *pf = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
- NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat:pf shareContext:nil];
- self = [super initWithFrame:frameRect pixelFormat:pf];
- [self setPixelFormat:pf];
- [self setOpenGLContext:context];
- return self;
-}
-- (void)prepareOpenGL
-{
- NSLog(@"prepare");
-
- // Synchronize buffer swaps with vertical refresh rate
- GLint swapInt = 1;
- [[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
-
- // Create a display link capable of being used with all active displays
- CVDisplayLinkCreateWithActiveCGDisplays(&dl);
-
- // Set the renderer output callback function
- CVDisplayLinkSetOutputCallback(dl, &MyDisplayLinkCallback, (__bridge void*)self);
-
- // Set the display link for the current renderer
- CGLContextObj cglContext = [[self openGLContext] CGLContextObj];
- CGLPixelFormatObj cglPixelFormat = [[self pixelFormat] CGLPixelFormatObj];
- CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(dl, cglContext, cglPixelFormat);
-
- // Activate the display link
- CVDisplayLinkStart(dl);
-
- CGLEnable([self.openGLContext CGLContextObj], kCGLCECrashOnRemovedFunctions);
-
- CGLLockContext([[self openGLContext] CGLContextObj]);
- App::I.init();
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-
-// This is the renderer output callback function
-static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp* now,
- const CVTimeStamp* outputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, void* displayLinkContext)
-{
- CVReturn result = [(__bridge View*)displayLinkContext getFrameForTime:outputTime];
- return result;
-}
-
-- (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime
-{
- static double _timeFreq = CVGetHostClockFrequency();
- static double _prevTime = (double)outputTime->hostTime / _timeFreq;
- double hostTime = (double)outputTime->hostTime;
- double now = hostTime / _timeFreq;
-
- // this will not update unless 1/30th of a second has passed since the last update
- if ( now < _prevTime + (1.0 / 30.0) )
- {
- // Add your drawing codes here
- [[self openGLContext] makeCurrentContext];
-
- // We draw on a secondary thread through the display link
- // When resizing the view, -reshape is called automatically on the main
- // thread. Add a mutex around to avoid the threads accessing the context
- // simultaneously when resizing
- CGLLockContext([[self openGLContext] CGLContextObj]);
- App::I.clear();
- App::I.update(now - _prevTime);
-
- //[[self openGLContext] flushBuffer];
- // returning NO will cause the layer to NOT be redrawn
-
- CGLFlushDrawable([[self openGLContext] CGLContextObj]);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
- return NO;
- }
- else
- {
- // change whatever you want to change here, as a function of time elapsed
- _prevTime = now;
- // return YES to have your layer redrawn
- return YES;
- }
-
- return kCVReturnSuccess;
-}
-
-- (void)dealloc
-{
- // Release the display link
- CVDisplayLinkRelease(dl);
-}
-
-- (void)drawRect:(NSRect)dirtyRect
-{
- NSLog(@"drawRect");
- // Add your drawing codes here
- [[self openGLContext] makeCurrentContext];
-
- // We draw on a secondary thread through the display link
- // When resizing the view, -reshape is called automatically on the main
- // thread. Add a mutex around to avoid the threads accessing the context
- // simultaneously when resizing
- CGLLockContext([[self openGLContext] CGLContextObj]);
- App::I.update(0);
-
- //[[self openGLContext] flushBuffer];
- // returning NO will cause the layer to NOT be redrawn
-
- CGLFlushDrawable([[self openGLContext] CGLContextObj]);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-
-- (void)reshape
-{
- [super reshape];
-
- // We draw on a secondary thread through the display link. However, when
- // resizing the view, -drawRect is called on the main thread.
- // Add a mutex around to avoid the threads accessing the context
- // simultaneously when resizing.
- CGLLockContext([[self openGLContext] CGLContextObj]);
-
- // Get the view size in Points
- NSRect viewRectPoints = [self bounds];
-
-#if SUPPORT_RETINA_RESOLUTION
-
- // Rendering at retina resolutions will reduce aliasing, but at the potential
- // cost of framerate and battery life due to the GPU needing to render more
- // pixels.
-
- // Any calculations the renderer does which use pixel dimentions, must be
- // in "retina" space. [NSView convertRectToBacking] converts point sizes
- // to pixel sizes. Thus the renderer gets the size in pixels, not points,
- // so that it can set it's viewport and perform and other pixel based
- // calculations appropriately.
- // viewRectPixels will be larger than viewRectPoints for retina displays.
- // viewRectPixels will be the same as viewRectPoints for non-retina displays
- NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];
-
-#else //if !SUPPORT_RETINA_RESOLUTION
-
- // App will typically render faster and use less power rendering at
- // non-retina resolutions since the GPU needs to render less pixels.
- // There is the cost of more aliasing, but it will be no-worse than
- // on a Mac without a retina display.
-
- // Points:Pixels is always 1:1 when not supporting retina resolutions
- NSRect viewRectPixels = viewRectPoints;
-
-#endif // !SUPPORT_RETINA_RESOLUTION
- App::I.resize(viewRectPixels.size.width, viewRectPixels.size.height);
-
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)renewGState
-{
- // Called whenever graphics state updated (such as window resize)
-
- // OpenGL rendering is not synchronous with other rendering on the OSX.
- // Therefore, call disableScreenUpdatesUntilFlush so the window server
- // doesn't render non-OpenGL content in the window asynchronously from
- // OpenGL content, which could cause flickering. (non-OpenGL content
- // includes the title bar and drawing done by the app with other APIs)
- [[self window] disableScreenUpdatesUntilFlush];
-
- [super renewGState];
-}
-- (void)mouseDown:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_down(0, mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)rightMouseDown:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_down(1, mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)mouseUp:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_up(0, mouseLoc.x, App::I.height - mouseLoc.y - 1);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)rightMouseUp:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_up(1, mouseLoc.x, App::I.height - mouseLoc.y - 1);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)mouseMoved:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
--(void)mouseDragged:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)rightMouseDragged:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_move(mouseLoc.x, App::I.height - mouseLoc.y - 1, theEvent.pressure);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)scrollWheel:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
- App::I.mouse_scroll(mouseLoc.x, App::I.height - mouseLoc.y - 1, [theEvent deltaY]);
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)keyDown:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto keyCode = [theEvent keyCode];
- auto chars = [theEvent characters];
- App::I.key_down(convert_key(keyCode));
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-- (void)keyUp:(NSEvent *)theEvent
-{
- CGLLockContext([[self openGLContext] CGLContextObj]);
- auto keyCode = [theEvent keyCode];
- auto chars = [theEvent characters];
- App::I.key_up(convert_key(keyCode));
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-@end
-
-@interface Window : NSWindow
-@end @implementation Window
-- (void)keyDown:(NSEvent *)theEvent
-{
- [[self windowController] keyDown:theEvent];
-}
-@end
-
-@interface Controller : NSWindowController
-@end @implementation Controller
-- (void)keyDown:(NSEvent *)theEvent
-{
- unichar c = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
- if (c == 27)
- {
- [[NSApplication sharedApplication] terminate:nil];
- }
-}
-- (void)windowDidResize:(NSNotification *)notification
-{
-
-}
-@end
-
-@interface AppOSX : NSApplication
-{
- Window* window;
- Controller* controller;
- View* view;
-}
-@end @implementation AppOSX
-- (instancetype)init
-{
- self = [super init];
- [self setActivationPolicy:NSApplicationActivationPolicyRegular]; // make it to the front
- [self setDelegate:self];
- return self;
-}
-- (void)applicationDidFinishLaunching:(NSNotification *)notification
-{
- App::I.initLog();
- App::I.create();
- NSRect r = NSMakeRect(0, 0, App::I.width, App::I.height);
-
- view = [[View alloc] initWithFrame:r];
-
- auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask;
- window = [[Window alloc] initWithContentRect:r styleMask:style backing:NSBackingStoreBuffered defer:NO];
- [window setTitle:@"PanoPainter 0.1.2 alpha"];
- [window center];
- [window makeKeyAndOrderFront:controller];
- [window setContentView:view];
- [window setAcceptsMouseMovedEvents:true];
- [window makeFirstResponder:view];
-
- controller = [[Controller alloc] initWithWindow:window];
-
- auto menubar = [NSMenu new];
- auto appMenuItem = [NSMenuItem new];
- [menubar addItem:appMenuItem];
- [self setMainMenu:menubar];
-
- auto appMenu = [NSMenu new];
- auto appName = [[NSProcessInfo processInfo] processName];
- auto quitTitle = [@"Quit " stringByAppendingString:appName];
- auto quitMenuItem = [[NSMenuItem alloc] initWithTitle:quitTitle
- action:@selector(terminate:) keyEquivalent:@"q"];
- [appMenu addItem:quitMenuItem];
- [appMenuItem setSubmenu:appMenu];
-
- NSLog(@"app launched");
-}
-@end
-
-int main(int argc, const char * argv[])
-{
- AppOSX* app = [AppOSX sharedApplication];
- [app run];
- return 0;
-}
-#endif
-#endif
-
#ifdef _WIN32
#pragma comment (lib, "opengl32.lib")
diff --git a/engine/node.cpp b/engine/node.cpp
index f25cc23..657c8b1 100644
--- a/engine/node.cpp
+++ b/engine/node.cpp
@@ -746,6 +746,7 @@ void Node::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr)
void Node::load_internal(const tinyxml2::XMLElement* x_node)
{
m_name = x_node->Name();
+ LOG("node %s", m_name.c_str());
init();
diff --git a/engine/sequencer.cpp b/engine/sequencer.cpp
new file mode 100644
index 0000000..0ad4667
--- /dev/null
+++ b/engine/sequencer.cpp
@@ -0,0 +1,3 @@
+#include "pch.h"
+#include "sequencer.h"
+
diff --git a/engine/sequencer.h b/engine/sequencer.h
new file mode 100644
index 0000000..50eace6
--- /dev/null
+++ b/engine/sequencer.h
@@ -0,0 +1,6 @@
+#pragma once
+
+class Sequencer
+{
+
+};
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..fd0f3f5
Binary files /dev/null and b/icon.png differ
diff --git a/icon512.png b/icon512.png
new file mode 100644
index 0000000..da62a12
Binary files /dev/null and b/icon512.png differ