=================================================================== RCS file: /home/cvs/OpenXM/src/cfep/MyOpenGLController.m,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -p -r1.1.1.1 -r1.3 --- OpenXM/src/cfep/MyOpenGLController.m 2006/03/03 23:31:12 1.1.1.1 +++ OpenXM/src/cfep/MyOpenGLController.m 2006/03/08 04:58:14 1.3 @@ -115,6 +115,8 @@ static int Gid=0; -(void) windowDidLoad { [super windowDidLoad]; + [myogl setGid: gid]; + // [self showCount]; } -(void) dealloc { @@ -141,6 +143,25 @@ static int Gid=0; -(void) addOglInitComm: (NSString *)comm { [myogl addOglInitComm: comm by: self]; } + +-(int) countOfOglComm {return [myogl countOfOglComm];} +-(int) countOfOglInitComm {return [myogl countOfOglInitComm];} +-(int) removeLastOfOglComm {return [myogl removeLastOfOglComm];} +-(int) removeLastOfOglInitComm {return [myogl removeLastOfOglInitComm];} +-(int) removeAllOfOglComm { return [myogl removeAllOfOglComm];} +-(int) removeAllOfOglInitComm {return [myogl removeAllOfOglInitComm];} +-(NSMutableArray *) getListOfOglComm { return [myogl getListOfOglComm];} +-(NSMutableArray *) getListOfOglInitComm { return [myogl getListOfOglInitComm]; } +-(void) showEyeX: (float) x Y: (float) y Z: (float) z { + [self clearOutput]; + [self output: [NSString stringWithFormat: @"gid=%d, n=%d, position of your eye:(%1.2f,%1.2f,%1.2f), nc=%d, ni=%d",gid,[self countOfOglComm],x,y,z,[myogl getOglCommSize],[myogl getOglInitCommSize]]]; +} +-(void) showCount { + [self clearOutput]; + [self output: [NSString stringWithFormat: @"gid=%d, number of OpenGL commands=%d, init=%d", + gid, [self countOfOglComm], [self countOfOglInitComm]]]; +} +-(void) clearOutput { [mymessage setBackgroundColor: [NSColor whiteColor]]; } //does it work? -(void) output: (NSString *)msg { [mymessage setStringValue: msg]; }