Re: Drawing in overlay planes

New Message Reply Date view Thread view Subject view Author view

Veraart (rioj7++at++fel.tno.nl)
Fri, 12 Apr 1996 18:19:20 +0200 (MET DST)


> I've got an image which should behave as a "sprite" cursor in the
> overlay planes. This works OK with the code below, but the cursor
> "flashes" a lot - like gfx usually do when you try to update on wrong
> rasterpositions or updates are too slow.
>
> At first I thought the image I'm drawing (with rectwrite) was too big,
> but the same problem occurs even when it's just 16x16 pixels. I'm
> running this on an Onyx with RE2 gfx and 4 PUs, so I guess there's
> enough horsepower present..
>
> [SNIP]
>
> I assume my problem is due to sloppy timing - that 'PostDraw' is not a
> good time to draw this stuff..? I'd be grateful for any input on this.

Why don't you just draw on the screen and not the overlay plane if you
draw the code every frame?
Just draw your bitmap as if it where a HUD.
For IRISGL you can use the following code

    pfGetChanSize(chan,&xSize,&ySize);
    sizeRatio = (float)xSize/(float)ySize;

    /* init state */
    pfPushState();
    pfBasicState();

    zfunction(ZF_ALWAYS);
    ortho2(-sizeRatio, sizeRatio,-1.0f, 1.0f); // or choose some better mapping
    mmode(MVIEWING);
    pfPushIdentMatrix();

    /* draw the stuff you want */

    /* restore state */
    zfunction(ZF_LEQUAL);
    pfPopMatrix();
    pfPopState();

Hope this will be of any help to you.

Mario


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:42 PDT

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