delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/04/05/16:32:28

Date: Tue, 5 Apr 94 16:16:49 -0400
From: U-E59264-Osman Buyukisik <buyukisik_o_f AT ae DOT ge DOT com>
To: fsandy AT max DOT tiac DOT net
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Can't Get Graphics

>>>>> "Frank" == Frank Sandy <fsandy%max.tiac.net> writes:

    Frank>      I am trying, unsuccessfully, to use the graphics
    Frank> library that comes with djgpp.  I expected the following
    Frank> trivial program to draw a single red line.  The go32
    Frank> environment variable is undefined.  I expected that I would
    Frank> use the default VGA driver for now.  It is compiled and run
    Frank> with:

    Frank>        gcc graph.c -lgr go32 a.out
I used -lgrx
    Frank> #include <graphics.h> void main () { /* Trivial Test
    Frank> Program To Draw One Red Line */ int red;
    Frank> GrSetMode(GR_default_graphics,800,600); red =
    Frank> GrAllocColor(255,0,0); GrLine(60,60,200,400,red); /* Try to
    Frank> restore text mode before exiting */
    Frank> GrSetMode(GR_80_25_text,80,25); }
I used GR_default_text instead.

    Frank>      Using libgrx instead of libgr produces no graphic
    Frank> output at all.

    Frank>      In case its relevant I am running DOS 6.2 on a 486DX2.

Mine worked ok. Just put a getkey() before the last GrSetMode call so
that you can see what is happening. my GO32 env var is also empty. I
have an ibm ps/2 386 vga with drdos6.

May be you need a special graphics driver?

Osman



- Raw text -


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