delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/04/21/07:26:46

From: <LIP AT odie DOT ee DOT wits DOT ac DOT za>
To: U-E59264-Osman Buyukisik <buyukisik_o_f AT ae DOT ge DOT com>,
djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 21 Apr 1994 11:12:48 SAT
Subject: Re: Graphic stuff for DJGPP

Greetings,

> I just looked at VOGL examples, and the reason they are not working
> is that now REDRAW event is not being produced with winopen(). So,
> just comment out the while(qread(&val) != REDRAW) line, and it works.
> I think this is benign and that line is not needed for DOS anyways.
> 
> Hope this helps.
> Osman

I received from Bernie the following solution to a bug with the 
GRX 1.03 - VOGL combination which solved my problems in running the 
VOGL demos. I have not yet tried the above but did note that the 
input event handling was a little "glitchy".

The grx.c driver file must be updated and the libraries 
(libvogl/libhersh) rebuilt. 
=========================================
From: bernie AT ecr DOT mu DOT oz DOT au

Having now actually looked at the problem, I've found a fix:

Replace the grx_lstyle function with this: (I've included the width 
function as well)..
------------------
static
int grx_lwidth( int w )
{
    grx.lopt.lno_width = w;
    if (w == 1 && grx.lopt.lno_pattlen == 0)
        vdevice.dev.Vdraw = grx_solid;
    else
        vdevice.dev.Vdraw = grx_pattern;
}

static
int grx_lstyle( int s )
{

    static unsigned char    dashes[16];
    unsigned ls = s;
    int i, n, a, b, offset;

    if (grx.lopt.lno_width == 1 && (ls == 0 || ls == 0xffff)) {
        vdevice.dev.Vdraw = grx_solid;
        grx.lopt.lno_pattlen = 0;
        return;
    }

    for (i = 0; i < 16; i++)
        dashes[i] = 0;

#define ON  1
#define OFF 0
        
    a = b = OFF;
    if (ls & (1 << 0))
        a = b = ON;

    n = 0;
    for (i = 0; i < 16; i++) {  /* Over 16 bits */
        if (ls & (1 << i))
            a = ON;
        else
            a = OFF;

        if (a != b) {
            b = a;
            n++;
        }
        dashes[n]++;
    }

    grx.lopt.lno_pattlen = 16;
    grx.lopt.lno_dashpat = dashes;
    vdevice.dev.Vdraw = grx_pattern;
}
------------------
I should have looked at the code mroe closely before... even though 
these features were not in enabled in the grx library at that time.
Bernie.
======================================

Regards,
Tony.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019