[BACK]Return to MyOpenGLCommand.m CVS log [TXT][DIR] Up to [local] / OpenXM / src / cfep

Diff for /OpenXM/src/cfep/MyOpenGLCommand.m between version 1.2 and 1.7

version 1.2, 2006/03/06 08:55:31 version 1.7, 2018/10/18 04:59:45
Line 25 
Line 25 
 }  }
 -(void)print {  -(void)print {
   int i;    int i;
   NSLog(@"command=%s, opCode=%d, [",command,opCode);    NSLog(@"command=%@s, opCode=%d, [",command,opCode);
   for (i=0; i<4; i++) NSLog(@"%f,",f4[i]);    for (i=0; i<4; i++) NSLog(@"%f,",f4[i]);
   NSLog(@"; ");    NSLog(@"; ");
   for (i=0; i<4; i++) NSLog(@"%d,",i4[i]);    for (i=0; i<4; i++) NSLog(@"%d,",i4[i]);
   NSLog(@"]\n");    NSLog(@"]\n");
 }  }
   -(NSString *)toString {
     return [NSString stringWithFormat: @"%@[%d], %f, %f, %f, %f; %d, %d, %d, %d",command,opCode,f4[0],f4[1],f4[2],f4[3],i4[0],i4[1],i4[2],i4[3]];
   }
 +(MyOpenGLCommand *)allocAndCompile: (NSString *)cmd by: (id) sender {  +(MyOpenGLCommand *)allocAndCompile: (NSString *)cmd by: (id) sender {
   MyOpenGLCommand *c;    MyOpenGLCommand *c;
   c=[[MyOpenGLCommand alloc] init];    c=[[MyOpenGLCommand alloc] init];
Line 69 
Line 72 
    }else if ([s compare: @"glColor4f"] == NSOrderedSame) {     }else if ([s compare: @"glColor4f"] == NSOrderedSame) {
         opCode = CFEPglColor4f;  fargc = 4; iargc = 0;  endGroup = NO;          opCode = CFEPglColor4f;  fargc = 4; iargc = 0;  endGroup = NO;
   
      }else if ([s compare: @"glClear"] == NSOrderedSame) {
           opCode = CFEPglClear;  fargc = 0; iargc = 1;  endGroup = YES;
   
      }else if ([s compare: @"glClearColor"] == NSOrderedSame) {
           opCode = CFEPglClearColor;  fargc = 4; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glClearDepth"] == NSOrderedSame) {
           opCode = CFEPglClearDepth;  fargc = 1; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glDisable"] == NSOrderedSame) {
           opCode = CFEPglDisable;  fargc = 0; iargc = 1;  endGroup = YES;
   
      }else if ([s compare: @"glEnable"] == NSOrderedSame) {
           opCode = CFEPglEnable;  fargc = 0; iargc = 1;  endGroup = YES;
   
    }else if ([s compare: @"glEnd"] == NSOrderedSame) {     }else if ([s compare: @"glEnd"] == NSOrderedSame) {
         opCode = CFEPglEnd;  fargc = 0; iargc = 0;  endGroup = YES;          opCode = CFEPglEnd;  fargc = 0; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glFlush"] == NSOrderedSame) {
           opCode = CFEPglFlush;  fargc = 0; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glLineStipple"] == NSOrderedSame) {
           opCode = CFEPglLineStipple;  fargc = 0; iargc = 2;  endGroup = YES;
   
      }else if ([s compare: @"glLineWidth"] == NSOrderedSame) {
           opCode = CFEPglLineWidth;  fargc = 1; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glNormal3f"] == NSOrderedSame) {
           opCode = CFEPglNormal3f;  fargc = 3; iargc = 0;  endGroup = YES;
   
      }else if ([s compare: @"glPointSize"] == NSOrderedSame) {
           opCode = CFEPglPointSize;    fargc = 1; iargc = 0; endGroup = NO;
   
    }else if ([s compare: @"glRectf"] == NSOrderedSame) {     }else if ([s compare: @"glRectf"] == NSOrderedSame) {
         opCode = CFEPglRectf;    fargc = 4; iargc = 0; endGroup = YES;          opCode = CFEPglRectf;    fargc = 4; iargc = 0; endGroup = YES;
   
    }else if ([s compare: @"glVertex3f"] == NSOrderedSame) {     }else if ([s compare: @"glVertex3f"] == NSOrderedSame) {
         opCode = CFEPglVertex3f;    fargc = 3; iargc = 0; endGroup = NO;          opCode = CFEPglVertex3f;    fargc = 3; iargc = 0; endGroup = NO;
   
      }else if ([s compare: @"glVertex2f"] == NSOrderedSame) {
           opCode = CFEPglVertex2f;    fargc = 2; iargc = 0; endGroup = NO;
   
    }else if ([s compare: @"glib_line"] == NSOrderedSame) {     }else if ([s compare: @"glib_line"] == NSOrderedSame) {
         opCode = CFEPglib_line;    fargc = 4; iargc = 1; endGroup = YES;          opCode = CFEPglib_line;    fargc = 4; iargc = 1; endGroup = YES;
   
Line 115 
Line 151 
     return nil;      return nil;
    }     }
    // Format glxxxpfqi  fargc=p, iargc=q.  Example: glxxx4f1i, 0.1,0.2,0.3,0.4,34     // Format glxxxpfqi  fargc=p, iargc=q.  Example: glxxx4f1i, 0.1,0.2,0.3,0.4,34
      command = s;
      [command retain]; // bug. How to release?
    if (fargc > 0) {     if (fargc > 0) {
         for (i=1; i< min(n,fargc+1); i++) {          for (i=1; i< min(n,fargc+1); i++) {
             x = [a objectAtIndex: i];              x = [a objectAtIndex: i];
Line 144 
Line 182 
 -(double *)getF4 { return f4; }  -(double *)getF4 { return f4; }
 -(int *) getI4 { return i4; }  -(int *) getI4 { return i4; }
 -(NSArray *)getArgv { return argv; }  -(NSArray *)getArgv { return argv; }
   
   
 @end  @end
   
Line 323  static int debugMyUtil = 0;
Line 360  static int debugMyUtil = 0;
 }  }
   
   
 @end  
   
   @end

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>