mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
still tweaking
This commit is contained in:
parent
703585b0ac
commit
33c56918d6
@ -27,9 +27,3 @@
|
||||
main.mm
|
||||
|
||||
#end bin_target
|
||||
|
||||
//#begin bin_target
|
||||
// #define TARGET iphone_pview
|
||||
// #define SOURCES main.mm
|
||||
//#end bin_target
|
||||
|
||||
|
@ -101,6 +101,12 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Make sure the buffer is initially cleared, so we don't look at
|
||||
// whatever happened to be in the framebuffer.
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
[context presentRenderbuffer:GL_RENDERBUFFER_OES];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,31 @@ PandaFramework framework;
|
||||
int argc = 0;
|
||||
char **argv = NULL;
|
||||
|
||||
- (void)applicationDidFinishLaunching:(UIApplication *)application {
|
||||
void
|
||||
signal_handler(int i) {
|
||||
nout << "Caught signal " << i << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching: (UIApplication *)application {
|
||||
ConfigVariableBool pview_trap_signals("pview-trap-signals", false);
|
||||
if (pview_trap_signals) {
|
||||
// Set up a signal handler on every signal, so we can report this to
|
||||
// the log.
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = signal_handler;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
for (int i = 1; i < 32; ++i) {
|
||||
if (sigaction(i, &sa, NULL) < 0) {
|
||||
ostringstream strm;
|
||||
strm << "sigaction(" << i << ")";
|
||||
perror(strm.str().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the "command-line arguments" provided in the Config file.
|
||||
ConfigVariableString pview_args("pview-args", "");
|
||||
argc = pview_args.get_num_words() + 1;
|
||||
typedef char *charp;
|
||||
@ -49,6 +73,10 @@ char **argv = NULL;
|
||||
[self startAnimation];
|
||||
}
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning: (UIApplication *)application {
|
||||
nout << "applicationDidReceiveMemoryWarning\n";
|
||||
}
|
||||
|
||||
- (void)startAnimation {
|
||||
self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(drawView) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "pandabase.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <UIKit/UITextView.h>
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#import "viewController.h"
|
||||
#include "pnotify.h"
|
||||
|
||||
@implementation ControllerDemoViewController
|
||||
|
||||
@ -65,6 +66,7 @@
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[ super didReceiveMemoryWarning ];
|
||||
/* Add custom low-memory code here */
|
||||
nout << "low-memory handler in view controller\n";
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
|
Loading…
x
Reference in New Issue
Block a user