lrectwrite in an overlay plane

New Message Reply Date view Thread view Subject view Author view

Morten Eriksen (mortene++at++pvv.unit.no)
Thu, 28 Mar 1996 09:23:06 +0100 (MET)


Hi,

I'm having some trouble with the gl call 'lrectwrite' in my
application. Here's the code I use:

unsigned long parray[] = {
  0x80ff00ff,0x80ff00ff,0x80ff00ff,
  0x80ff00ff,0x80ff00ff,0x80ff00ff,
  0x80ff00ff,0x80ff00ff,0x80ff00ff,
};

drawmode(ViewState->overlay);
lrectwrite(x-1, y-1, x+1, y+1, parray);
drawmode(NORMALDRAW);

Where ViewState->overlay is earlier in the program found with:

ViewState->overlay = (getgdesc(GD_BITS_OVER_SNG_CMODE) ? OVERDRAW :
                     (getgdesc(GD_BITS_PUP_SNG_CMODE) ? PUPDRAW : 0));
  

As far as I can understand, this should draw me a square 3x3 rectangle
in yellow (RGB = 0xff00ff), with center in (x, y). I've tested it on
three different SGI machines, with different results all over:

On an Indy system with 8 bit gfx: white 3x3 square.
On an Indigo system with 24 bit Elan gfx: black 3x3 square.
On an Onyx with RE2 gfx: nothing at all!

I've been playing around with different pixmode()-values and
color-setting calls, but with no luck.. so, what am I doing wrong?

Regards,
Morten Eriksen


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:35 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.