Add GLFW reference

This commit is contained in:
Chinmay Garde 2021-05-04 11:51:52 -07:00 committed by Dan Field
parent 2092759b01
commit e8a4173daf
2 changed files with 11 additions and 7 deletions

View File

@ -38,5 +38,6 @@ executable("host") {
":impeller_host_shaders",
"//flutter/fml",
"//flutter/impeller/impeller",
"//third_party/glfw",
]
}

View File

@ -6,7 +6,8 @@
#include "impeller_host_view_controller.h"
@interface ImpellerAppDelegate : NSObject <NSApplicationDelegate, NSWindowDelegate> {
@interface ImpellerAppDelegate
: NSObject <NSApplicationDelegate, NSWindowDelegate> {
NSWindow* window_;
ImpellerHostViewController* view_controller_;
}
@ -17,11 +18,11 @@
- (id)init {
if (self = [super init]) {
view_controller_ = [[ImpellerHostViewController alloc] init];
window_ =
[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
backing:NSBackingStoreBuffered
defer:NO];
window_ = [[NSWindow alloc]
initWithContentRect:NSMakeRect(0, 0, 800, 600)
styleMask:NSWindowStyleMaskTitled | NSWindowStyleMaskClosable
backing:NSBackingStoreBuffered
defer:NO];
[window_ setContentViewController:view_controller_];
}
return self;
@ -48,7 +49,9 @@ int main(int argc, const char* argv[]) {
[item.submenu
addItem:[[NSMenuItem alloc]
initWithTitle:[@"Quit "
stringByAppendingString:[NSProcessInfo processInfo].processName]
stringByAppendingString:[NSProcessInfo
processInfo]
.processName]
action:@selector(terminate:)
keyEquivalent:@"q"]];
ImpellerAppDelegate* appDelegate = [[ImpellerAppDelegate alloc] init];