home *** CD-ROM | disk | FTP | other *** search
- 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
- From: mouli@irit.irit.fr (Richard MOULI)
- Newsgroups: comp.sys.sgi
- Subject: bug(s) in gldebug ?? (!)
- Message-ID: <2908@irit.irit.fr>
- Date: 27 Jan 93 18:09:36 GMT
- Sender: usenet@irit.fr
- Organization: IRIT-UPS, Toulouse, France
- Lines: 77
-
- I write this litle code to tri gldebug :
-
- ----------------------------------------------------------------
- #include <gl.h>
- #include <gl/get.h>
-
- main()
- { long w, w1, sw1;
-
- foreground();
- w = winopen("RGB");
- RGBmode();
- gconfig();
- RGBcolor(25, 220, 125);
- clear();
- w1 = winopen("MAP");
- sw1 = swinopen(w1);
- winposition(10, 20, 10, 20);
- reshapeviewport();
- winset(w1);
- color(2);
- clear();
- winset(w);
- printf("mode %ld %ld\n", DMRGB, getdisplaymode());
- winset(sw1);
- printf("mode %ld %ld\n", DMSINGLE, getdisplaymode());
- color(3);
- clear();
- getchar();
- }
-
- ----------------------------------------------------------------
- the ouput of an excecution is :
- mode 0 0
- mode 1 1
-
- This mean the window w is in single buffer and rgb color mode.
- And the subwindow of sw1 of window w1 is in single buffer and map color mode.
- It's what it's expected.
-
- Then I run :
- % gldegub test
- and I obtained the following history produced by gldebug :
- ----------------------------------------------------------------
- /* GLDEBUG HISTORY */
-
- foreground();
- winopen("RGB");
- RGBmode();
- gconfig();
- RGBcolor(25, 220, 125);
- clear();
- winopen("MAP");
- swinopen(2);
- winposition(10, 20, 10, 20);
- reshapeviewport();
- winset(2);
- color(2);
- clear();
- winset(1);
- getdisplaymode();
- winset(3);
- getdisplaymode();
- color(3);
-
- /* XXX GLDEBUG WARNING - color(): called in bad state: RGB mode XXX */
-
- clear();
- ----------------------------------------------------------------
-
- Does anybody have an explanation of the warning detected by gldebug?
- Is this a bug of gldebug?
- ...
-
- Richard MOULI UPS-IRIT Toulouse FRANCE
-
- mouli@irit.fr
-