home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19181 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.9 KB  |  88 lines

  1. Path: sparky!uunet!opl.com!hri.com!spool.mu.edu!yale.edu!newsserver.jvnc.net!gmd.de!Germany.EU.net!mcsun!julienas!cix!irit!mouli
  2. From: mouli@irit.irit.fr (Richard MOULI)
  3. Newsgroups: comp.sys.sgi
  4. Subject: bug(s) in gldebug ?? (!)
  5. Message-ID: <2908@irit.irit.fr>
  6. Date: 27 Jan 93 18:09:36 GMT
  7. Sender: usenet@irit.fr
  8. Organization: IRIT-UPS, Toulouse, France
  9. Lines: 77
  10.  
  11. I write this litle code to tri gldebug :
  12.  
  13. ----------------------------------------------------------------
  14. #include <gl.h>
  15. #include <gl/get.h>
  16.  
  17. main()
  18. {    long w, w1, sw1;
  19.  
  20.     foreground();
  21.     w = winopen("RGB");
  22.     RGBmode();
  23.     gconfig();
  24.     RGBcolor(25, 220, 125);
  25.     clear();
  26.     w1 = winopen("MAP");
  27.     sw1 = swinopen(w1);
  28.     winposition(10, 20, 10, 20);
  29.     reshapeviewport();
  30.     winset(w1);
  31.     color(2);
  32.     clear();
  33.     winset(w);
  34.     printf("mode %ld %ld\n", DMRGB, getdisplaymode());
  35.     winset(sw1);
  36.     printf("mode %ld %ld\n", DMSINGLE, getdisplaymode());
  37.     color(3);
  38.     clear();
  39.     getchar();
  40. }
  41.  
  42. ----------------------------------------------------------------
  43. the ouput of an excecution is : 
  44. mode 0 0
  45. mode 1 1
  46.  
  47. This mean the window w is in single buffer and rgb color mode.
  48. And the subwindow of sw1 of window w1 is in single buffer and map color mode.
  49. It's what it's expected.
  50.  
  51. Then I run :
  52. % gldegub test
  53. and I obtained the following history produced by gldebug :
  54. ----------------------------------------------------------------
  55. /* GLDEBUG HISTORY */
  56.  
  57. foreground();
  58. winopen("RGB");
  59. RGBmode();
  60. gconfig();
  61. RGBcolor(25, 220, 125);
  62. clear();
  63. winopen("MAP");
  64. swinopen(2);
  65. winposition(10, 20, 10, 20);
  66. reshapeviewport();
  67. winset(2);
  68. color(2);
  69. clear();
  70. winset(1);
  71. getdisplaymode();
  72. winset(3);
  73. getdisplaymode();
  74. color(3);
  75.  
  76. /* XXX GLDEBUG WARNING - color(): called in bad state: RGB mode XXX */
  77.  
  78. clear();
  79. ----------------------------------------------------------------
  80.  
  81. Does anybody have an explanation of the warning detected by gldebug?
  82. Is this a bug of gldebug?
  83. ...
  84.  
  85. Richard MOULI UPS-IRIT Toulouse FRANCE
  86.  
  87. mouli@irit.fr
  88.