home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VGALIB.ZIP / README.1ST < prev    next >
Text File  |  1992-10-13  |  5KB  |  113 lines

  1.  
  2.  
  3. Info on VIO direct graphics demos...
  4. ************************************
  5.  
  6.  
  7. 10/13/92  -  Test release of some of my demos and code.
  8.  
  9. This is the first release of my tiny direct graphics library
  10. and associated demos.  The purpose of this library was to see if
  11. it was possible to write programs that write directly to the video
  12. hardware without PM.  This was accomplished by using the Vio subsystem
  13. that is still supported under OS/2 2.0  The Vio subsystem has several
  14. calls which are useful for this.  The 2 primary calls used to implement
  15. this are VioGetPhysBuf() and VioSetMode().  I got examples of this
  16. from Norton's book on OS/2 programming (1.3 code, but with some changes
  17. it works under 2.0)   
  18.  
  19.  
  20. I won't provide any detailed information this time around, I mainly 
  21. want to let some people see it, and get feedback.  I'm not sure
  22. how much farther I'm going to go, it all depends on wether or not
  23. I have time, and get the tools to complete the job the right way.
  24.  
  25.  
  26. Here is what is done:  2d lines (if either of the endpoints are outside of the
  27. screen then the line isn't drawn, I haven't done 2d clipping yet...)
  28. 2d points.  Screenclears, solid filled boxes, circles (although I discovered
  29. that my aspect ratio is not square in 320x200, so I'll need to fix it...)
  30. and some other things.  
  31.  
  32. I did a VERY simple 3d demo, using points, a HUGE array of a 3d heightfield,
  33. 3d sin functions, and some rotation.  I would like to improve upon this 
  34. dramatically after writing some more 2d primitives (ala putimage getimage etc
  35. from turbo c...)  I also have no filled polygons or floodfill yet.
  36.  
  37. If anyone has good code that works already for 3d projection (must have
  38. depth so I can do z-buffering, and depth sorting) or other stuff 
  39. i.e. finished floodfill algorithms in c... Let me know!
  40.  
  41. I REALLY need to get some sort of assembler for use with OS/2 2.0
  42. I know where there are some EXCELLENT 3d polyblit codes, but they 
  43. are in asm, and I don't want to waste my time rewriting them in C, only
  44. to be disappointed with the speed.
  45.  
  46.  
  47.  
  48. Demo info:
  49. **********
  50.  
  51. Volcano:  This is a simple program that is supposed to simulate a volcano,
  52.          it was my first demo with my library.  It has one command line
  53.          parameter, which is the max number of lava points that can be in
  54.          the air at one time.  The least is about 30, the max is 2000.
  55.          If you enter an illegal value it will probably blow up (i.e. 
  56.          give you a GPF or register dump :-)  But then OS/2 is great for
  57.          that, so if you want to demonstrate a program crashing, you might
  58.          want to purposefully use a number over 2000...
  59.          (I'll fix this later, not real high on my priority list)
  60.  
  61.  
  62. Cells:  This demo is based upon a Scientific American article from a long
  63.        time back, I coded a version in pascal some time ago, and just
  64.        changed it over to C, and my graphics library.  You will be prompted
  65.        for the number of states in the system and wether or not you would like
  66.        cells to keep crunching when it isn't in the foreground.
  67.  
  68.  
  69. Wave:  Wave is my favorite, although it is also the least polished.
  70.       Wave requires 1Mb of free ram to run, it needs this ram to generate
  71.       a large heightfield to hold the 3d surface.  (hey, we've got the
  72.       ram so lets use it!!!)   DO NOT RUN THIS IF YOU DO NOT HAVE A 
  73.       MATH COPROCESSOR, IT WILL TAKE TO LONG!!!
  74.       I saw it run on a machine without a math chip, and it never completed
  75.       calculating the 3d surface, not sure what to do about it at the moment,
  76.       I may use fixed point sin tables to correct the problem with speed
  77.       during the initial setup.
  78.       
  79.       I plan to focus most of my work on getting some sort of 3D library
  80.       written, based upon the results I've gotten so far with Wave and
  81.       some other tests.  There is much to be done with this, and this is
  82.       really an alpha as it were...  I won't go into anything else here,
  83.       just use some reasonable values for rho, d, etc..
  84.       The number of points on a side can be anywhere from 10 to 100.
  85.       The shape that is rotated and scrolled is a sinewave swept around
  86.       the Z-axis.  The points are colored by height, but are not depth
  87.       sorted so glitches will occur when there are a large number of 
  88.       points in a small area.  
  89.  
  90.  
  91. For more info:
  92. **************
  93.  
  94. If you have any suggestions/questions about these demos or source, 
  95. feel free to send me email on internet at:   johns@cs.umr.edu
  96.  
  97. I also read the OS/2 programmers group    comp.os.os2.programmer 
  98. on usenet.
  99.  
  100. Thanks,
  101.         John E. Stone
  102.         johns@cs.umr.edu
  103.  
  104.  
  105.  
  106. P.S.  If anyone is interested in developing games for OS/2 that use these
  107.       routines, I'd be more than happy to help them get started, I'd like
  108.       to see some stuff like that, so that OS/2 will have a jump on 
  109.       windows NT for stuff like games/ 3d stuff...
  110.  
  111.     
  112.  
  113.