Cube demo running in iOS simulator.
This commit is contained in:
parent
7910f43867
commit
b4de675878
@ -42,8 +42,14 @@
|
||||
|
||||
self.view.contentScaleFactor = UIScreen.mainScreen.nativeScale;
|
||||
|
||||
const char* arg = "cube";
|
||||
demo_main(&demo, self.view.layer, 1, &arg);
|
||||
#if TARGET_OS_SIMULATOR
|
||||
// Avoid linear host-coherent texture loading on simulator
|
||||
const char* argv[] = { "cube", "--use_staging" };
|
||||
#else
|
||||
const char* argv[] = { "cube" };
|
||||
#endif
|
||||
int argc = sizeof(argv)/sizeof(char*);
|
||||
demo_main(&demo, self.view.layer, argc, argv);
|
||||
demo_draw(&demo);
|
||||
|
||||
uint32_t fps = 60;
|
||||
|
@ -43,8 +43,9 @@
|
||||
|
||||
self.view.wantsLayer = YES; // Back the view with a layer created by the makeBackingLayer method.
|
||||
|
||||
const char* arg = "cube";
|
||||
demo_main(&demo, self.view.layer, 1, &arg);
|
||||
const char* argv[] = { "cube" };
|
||||
int argc = sizeof(argv)/sizeof(char*);
|
||||
demo_main(&demo, self.view.layer, argc, argv);
|
||||
|
||||
CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
|
||||
CVDisplayLinkSetOutputCallback(_displayLink, &DisplayLinkCallback, &demo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user