home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / 3d / irit / scripts / clients.irt < prev    next >
Encoding:
Text File  |  1995-02-05  |  1.4 KB  |  62 lines

  1. #
  2. # Some simple tests of running clients.
  3. #
  4.  
  5. Client = "xmtdrvs -s-";
  6. if ( machine == ibmos2, Client = "os2drvs -s-" );
  7. if ( machine == ibmnt,  Client = "wntdrvs -s-" );
  8. if ( machine == sgi,    Client = "xgldrvs -s-" );
  9.  
  10. printf( "Executing Client \"%s\"", list( Client ) );
  11.  
  12. h1 = clntexec( Client );
  13.  
  14. clntwrite( h1, axes );
  15. clntwrite( h1, sphere( vector( 0, 0, 0 ), 0.6 ) );
  16.  
  17. h2 = clntexec( Client );
  18.  
  19. s45 = sqrt(2) / 2;
  20. halfcirc = cbspline( 3,
  21.              list( ctlpt( P3, 1.0,  0.0, 0.0,  1.0 ),
  22.                    ctlpt( P3, s45, -s45, 0.0,  s45 ),
  23.                    ctlpt( P3, 1.0, -1.0, 0.0,  0.0 ),
  24.                    ctlpt( P3, s45, -s45, 0.0, -s45 ),
  25.                ctlpt( P3, 1.0,  0.0, 0.0, -1.0 ) ),
  26.              list( 0, 0, 0, 1, 1, 2, 2, 2 ) );
  27. color( halfcirc, white );
  28.  
  29. sp = surfrev( halfcirc * sc( 0.6 ) );
  30.  
  31. clntwrite( h2, axes );
  32. clntwrite( h2, sp );
  33.  
  34. pause();
  35.  
  36. clntclose( h1, true );
  37.  
  38. obj1 = clntgetobj( h2, "axes" ); # Do write and read - a macro in iritinit.irt
  39. obj2 = clntgetobj( h2, "sp" );   # Do write and read - a macro in iritinit.irt
  40.  
  41. iritstate( "dumplevel", 9 );
  42. obj1;
  43. obj2;
  44. iritstate( "dumplevel", 1 );
  45.  
  46. h3 = clntexec( "nuldrvs -s- -d" );
  47. clntwrite( h3, obj1 );
  48. clntwrite( h3, obj2 );
  49. pause();
  50. clntclose( h3, true );
  51.  
  52. obj3 = clntread( h2, 1000 );     # No data - timeout after 1 second.
  53.  
  54. h4 = clntexec( "" );
  55. clntwrite( h4, obj1 );
  56. clntwrite( h4, obj2 );
  57. pause();
  58. clntclose( h4, true );
  59.  
  60. pause();
  61. clntclose( h2, true );
  62.