MegaGraph Graphics Library -------------------------- Version 2.0 ----------- What is the MGL? ---------------- The MegaGraph Graphics Library (MGL) is a full featured 32 bit graphics library for high performance graphics programming on IBM PC compatibles. It provides fast, low level rasterisation of 2D and 3D primitives, that can be used for computer games, user interface software and other real-time graphics applications. The MGL fully supports all video mode resolutions from 320x200 right up to 1600x1200, with any pixel depth from 4 bits per pixel right up to 32 bits per pixel. The MGL currently supports development under both DOS and Windows, and versions are planned for OS/2 Presentation Manager and X11. When running under Windows, the MGL can be used for rendering in a windowed environment by using WinG and/or DirectDraw under Windows 3.1/95 and NT. We are also in the process or porting the full screen DOS drivers to run under our new WinDirect environment, for full screen high performance graphics under Windows 3.1 and Windows '95. The MGL in brief ---------------- Features: . High performance 32 bit assembler code for maximum speed . Resolutions from 320x200 to 1600x1200 . Color depths from 4 bits to 32 bits per pixel . Support for DOS and Windows . Full hardware and software double buffering support . Rendering direct to video memory . Rendering direct to offscreen video memory . Rendering to system memory buffers . Full linear surface virtualisation . Direct surface access to bypass the MGL if desired . Support planned for WinDirect full screen graphics . C++ wrapper class API . Loading of Windows bitmaps, fonts, cursors and icons Event handling support: . Unified event queue handling mechanism . Supports keyboard events KEYDOWN, KEYUP and KEYREPEAT . Supports mouse events MOUSEMOVE, MOUSEDOWN and MOUSEUP . Supports user specified timer events . Supports user events posted to queue Graphics output: . Lines . Rectangles . Ellipses . Elliptical arcs . Text . Monochrome bitmaps . Complex regions (including union, difference, intersection etc) . BitBlt . TransBlt (source transparency) . StretchBlt . Flat triangles/quads . Smooth triangles/quads . Zbuffered triangles/quads . Real-time 8 bit dithering Device independant, directly accessible drawing surfaces -------------------------------------------------------- The MGL is device independant, and provides routines for creating device surfaces for rendering directly to video memory, and surfaces for rendering directly to system memory. All the high performance 32 bit code in the MGL is written for flat linear framebuffer access, and under DOS the MGL will provide a virtual flat linear surface for normal VBE 1.2 and 2.0 devices if there is no hardware linear framebuffer support. The MGL provides a whole host of high peformance rendering routines including fast line drawing, bit blt operations with source transparency and stretching, fast 2d polygon filling and fast 3d polygon filling. However if the routines in the MGL do not suit your purposes, the MGL also provides direct access to the display surfaces, so you can render directly to the surface with your own application specific code, including rendering directly to video memory via the hardware or virtualised flat linear framebuffer. In cases where the virtual linear framebuffer is not available (for instance under Windows and OS/2 DOS sessions), the MGL provides high speed banked framebuffer as a fallback measure. High performance 3D line and polygon rendering ---------------------------------------------- The MGL provides full support for high speed rendering of flat shaded, smooth color index shaded and smooth RGB shaded lines, triangles and quadrilaterals. These may also be optionally Zbuffered for fast hidden surface removal using a software zbuffer. All the MGL line and polygon filling routines take all coordinates in 16.16 fixed point format, including color information for smooth shading. This provides the application with the ability to render primitives with full sub-pixel resolution for maximum precision. For smooth shading, the MGL offers two types of primitives. The first is simple color index shading, which interpolates a single color index across the face of the primitive. Under 15 bit and above video modes, this is supporting using the concept of pre-computed shade tables to convert between the color index and the RGB colors, providing performance comparable to 8 bit modes. The second is full RGB color shading, which interpolates each color channel individually for completely general shading, and is supported in all video modes from 8 bits per pixel to 32 bits per pixel. For RGB shading in 8 bits per pixel modes, the MGL provides high performance, real time 24 bit to 8 bit dithering, including full support for zbuffered and smooth shaded primitives. Hardware acceleration support ----------------------------- The MGL is also designed extensively to support full hardware acceleration. Although the first beta release does not include the hardware accelerated drivers from the MGL 1.1, we are developing a new low level acceleration specification that should be available for the final release, and will initially be supporting the ATI Mach32, Mach64 and S3 chipsets. With full hardware acceleration support, the MGL will support hardware acclerated BitBlt and TransBlt (source transparency) operations between offscreen memory surfaces and display memory surfaces, for incredibly fast sprite animation. Of course accelerated line drawing, rectangle filling and polygon filling will also be provided. Supported compilers: -------------------- The MGL 2.0 supports most popular DOS and Windows compilers. The initial beta release will be available for Borland C++ and Watcom C++. The final shipping release will also be supporting Microsoft Visual C++ and Metaware High C++. Currently only DOS4GW supports the virtual linear framebuffer, but support is planned for other extenders in the future. +--------------------------------------------------------------------------+ | SciTech Software - Building Truly Plug'n'Play Software! | +--------------------------------------------------------------------------+ | Kendall Bennett, Software Engineer | Email: KendallB@scitechsoft.com | | SciTech Software | Fax : +61 3 690 2137 | | Unit 5, 106 Southbank Boulevard | ftp : ftp.scitechsoft.com | | Southbank 3006 AUSTRALIA | www : http://www.scitechsoft.com | +--------------------------------------------------------------------------+