home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 6955 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  3.9 KB

  1. Path: sparky!uunet!mcsun!sunic!dkuug!diku!frandsen
  2. From: frandsen@diku.dk (Tommy Frandsen)
  3. Newsgroups: comp.os.linux
  4. Subject: VGAlib: New version 1.0 uploaded to banjo.concert.net
  5. Keywords: VGAlib, linux, ftp
  6. Message-ID: <1992Jul28.133546.20282@odin.diku.dk>
  7. Date: 28 Jul 92 13:35:46 GMT
  8. Sender: frandsen@skinfaxe.diku.dk
  9. Organization: Department of Computer Science, U of Copenhagen
  10. Lines: 77
  11.  
  12. Hi!
  13.  
  14. I have just uploaded version 1.0 of VGAlib, the VGA graphics 
  15. library for linux, to banjo.concert.net in the file
  16. /pub/Linux/Incoming/vgalib-1.0.tar.Z. As the previous versions 
  17. it has the following features:
  18.     - Support for all standard VGA 16 and 256 color modes
  19.     - Support for non-standard 256 color modes (including mode X)
  20.     - Text mode restoration
  21.     - Handling of console I/O
  22. The present version adds the following:
  23.     - Flipping between graphics mode and text mode at any time
  24.     - Restores text mode after CTRL-C interrupt
  25.     - Bug fixes and some minor improvements
  26.  
  27. VGAlib requires the 0.96b kernel (or newer) and must be compiled
  28. with GCC 2.2.2 (or newer). To compile and install VGAlib just 
  29. type make. This will also build a program to test the library.     
  30.  
  31. VGAlib does it's best to restore the text mode, but it may fail
  32. with some SVGA cards if you use a text mode with more than 80
  33. columns. If you are having problems please try to use an 80
  34. column text mode.
  35.  
  36. Below is a short description of the functions in the library.
  37. Look at vgatest.c for examples on how to use these functions:
  38.     - vga_setmode() is used to select the graphics mode or to 
  39.       restore the text mode.
  40.     - vga_clear() clears the graphics screen. This is also done
  41.       by vga_setmode().
  42.     - vga_getxdim(), vga_getydim() and vga_getcolors() returns
  43.       the resolution and number of colors for the current mode.
  44.     - vga_getpalette() and vga_getpalvec() returns the contents
  45.       of one or more palette registers, respectively.
  46.     - vga_setpalette() and vga_setpalvec() allows you to modify
  47.       one or more palette registers, respectively.
  48.     - vga_setcolor() determines the color for future calls of 
  49.       the drawing functions.
  50.     - vga_drawpixel() and vga_drawline() draws a pixel or a line
  51.       in the current color, respectively.
  52.     - vga_drawscanline() draws one single horisontal line of 
  53.       pixels, and has been optimized for the fastest possible
  54.       output. This should allow faster output with programs 
  55.       like image viewers.
  56.     - vga_screenoff() and vga_screenon() turns the screen refresh 
  57.       off and on. On some VGA's the graphics operations will be 
  58.       faster, if the screen is turned off during graphics output.
  59.     - vga_flip() switches between graphics and text mode without 
  60.       destroying the screen contents. This makes it possible for
  61.       your application to use both text and graphics output.
  62.     - vga_gecth() waits for a character to be typed an returns 
  63.       the ASCII value. If you press ESC (this can be changed with
  64.       vga_setflipchar()), the text mode will be temporarily 
  65.       restored until you press another key. This allows you to
  66.       switch to another virtual console and later return to your
  67.       graphics application.
  68.     - vga_setflipchar() changes the character that vga_getch() 
  69.       uses for flipping between graphics and text mode.  
  70.  
  71. My main motivation for implementing the graphics/text flipping was
  72. to make debugging easier. If your program reaches a breakpoint while
  73. in graphics mode, you can switch to text mode with the gdb command
  74.  
  75.     print vga_flip()
  76.  
  77. and later restore the graphics screen contents with the same command.
  78. It is usefull to define an alias:
  79.  
  80.     define flip <RETURN> print vga_flip() <RETURN> end <RETURN>
  81.  
  82. There has been a lot of interest in the previous versions of VGAlib,
  83. and I would like to thank everybody who has suggested improvements
  84. (in particular Alex C. Liu and Ben Cox).
  85.  
  86. Please send any comments, bug-reports etc to 
  87.  
  88.     frandsen@diku.dk (Tommy Frandsen)
  89.