GRX Graphics
Library
The latest official public
release GRX v2.3 is available from this site. Make sure you get
all three files:
(grx23.zip, grx23fnt.zip and grx23rme.1st) and carefully
read the instructions
below and in grx23rme.1st before installing GRX.
New Features in GRX v2.3
- Thomas Hahn ported GRX to DEC alpha systems
- Ulrich Leodolter contributed his latest X11 driver.
Several X11 problems (readpixel, color handling in pseudo
color mode) should be fixed now. Additionally GRX will
run on X11R5 systems now.
- Vincenzo Morello contributed the addons/ctx2jpeg source
- Andris Pavenis contributed the memory driver and the
addons/print sources
- Gary Sands ported GRX to Watcom C++ (32bit, V11.0, other
versions may work)
- Michal Stencl contributed the image handling code and the
addons/bmp sources
- code portability has be greatly enlarged. GRX should be
easily portable to new compilers now.
- BCC port should now work on all Borland
16bit compilers (Tested with BCC 2.0, 3.1 and 4.52)
- GRX will work on big endian systems (sparc)
- GRX has 64bit support
- GRX uses a more flexible scheme for temporary memory
allocation now. Depending system and the SMALL_STACK
switch either alloca or malloc will be used. GRX
allocates an internal buffer for blit blits, scanline
return, etc now
- GRX supports a platform independent keyboard interface
- Nearly all frame drivers have be optimized for
performance
- On Linux systems GRX can be build as shared lib
- New GRX functions:
- GrFloodFill
- GrGetScanline
- GrGetScanlineC
- GrPutScanline
- GrGetLibraryVersion
- GrGetLibrarySystem
- GrAllocEgaColors
- GrImage....
A detailed changelog is available
GRX Supported Platforms
Currently GRX directly supports the following platforms:
DOS |
DJGPP v1.12 |
GCC 2.6.3 |
DOS |
DJGPP v2.01 |
GCC 2.6.3, 2.7.2, 2.8.1 |
DOS |
Borland C++ |
BCC 2.0, 3.1, 4.52; 16bit only |
DOS |
Watcom C++ |
v11.0; 32bit only |
Linux |
svgalib |
GCC 2.7.2, 2.8.1 |
Linux |
X11R6 |
GCC 2.7.2, 2.8.1 |
Solaris |
X11R5 |
GCC 2.7.2, SUN cc v4.1 |
DEC alpha |
GRX should work on any X11R5 (or later) system after a few
changes in makedefs.gnu and makedefs.x11.
Most makefiles (DJGPP and Unix systems) require GNU make
Installing
GRX
Unzip the GRX archives
- create a directory for the GRX file tree. Examples:
DJGPP: |
DJGPP/contrib/grx23 |
Linux: |
/usr/src/grx-2.3 |
- unzip the GRX source archive in the GRX dir:
DOS: |
pkunzip -d grx23.zip |
Unix: |
unzip grx23.zip |
- unzip the GRX font archive in the same base dir:
DOS: |
pkunzip -d grx2fnt.zip |
Unix: |
unzip grx23fnt.zip |
Set the environment variables
- set the default driver and graphics mode info:
- SET GRX20DRV=<driver> gw <width> gh
<height> nc <colors>
(very useful but not required)
Available drivers for
DOS : |
stdvga, stdega, et4000, cl5426,
mach64, ati28800, VESA, memory |
Linux: |
svgalib, xwin, memory |
X11: |
xwin, memory |
- set the GRX font dir
- SET GRXFONT=<directory for the GRX fonts>
This is required for GRX graphics text output. Path:
<GRX base>/fonts
NOTE: |
You can define a default font directory when
compiling GRX. E.g, if you installed the fonts in
/usr/local/lib/grx/fonts add
CCOPT +=
-DGRX_DEFAULT_FONT_PATH="/usr/local/lib/grx/fonts"
to makedefs.gnu (Linux / GNU-make example) |
|
This is only required if there's no pre-compiled GRX for your
system or you want to change GRX or the library configuration.
- Go to GRX base dir and check the makefile and makedefs
file for your system setup
- Switch to src sub dir and check the makefile
- run make -f <your makefile>
(some system may need additional arguments here !)
- if every thing worked fine go to <GRX base>/test,
check the makefile and build all test files / examples:
- make -f <your makefile>
Testing
GRX
- go to <GRX base>/bin and run the modetest program.
If you don't have a modetest (or modtst16) binary, do
need to compile GRX first.
- Build and run the other examples (see above)
Installing GRX for your
compiler
You'll either need to copy some GRX files to places where your
compiler will find them (1) or to change your compiler setup so
it will find the GRX files in their default place (2).
- Copy the library from <GRX base>/lib/<your
system> to the compiler library directory.
Copy the header files from <GRX base>/include to
your compiler include directory
- See compiler documentation. Either change the default
compiler behavior (eg., change djgpp.env) or use command
line switches to tell the compiler where to find the GRX
files.
Important
Due to slight changes in grx20.h you'll have to
recompile your programs. Just relinking it won't work in
most cases.
Older
GRX Versions
Some information for older GRX version is still available. See
GRX v2.2
Help
If you have problems installing or running GRX check this site
(http://www.gnu.de/software/GRX/) for updates, pre-compiled libs,
... first.
Check out the known problems with
the current release before reporting a problem or bug
If this doesn't help, check your system/compiler FAQ (eg., the
DJGPP v2 FAQ is at http://www.delorie.com/djgpp/v2faq/)
Check out the DJGPP newsgroup comp.os.msdos.djgpp (archive
at http://www.delorie.com/djgpp/mail-archives/)
Send a problem report to the GRX mailing
list, to comp.os.msdos.djgpp
or sven@rufus.central.de.