Fastgraph
programmer's graphics library

What's New in Fastgraph 6.0?

Here is an overview of the most important new features in the Fastgraph 6.0 product family. For more specific information about any of these features, please consult the Fastgraph 6.0 help file.

Toward the bottom of this page, you'll find a brief summary of the 76 functions added in version 6.0, with links to Fastgraph's online help.

Vastly Improved 3D Support

The 3D functionality in Fastgraph 6.0 has been completely redesigned and enhanced. It works with but does not require Microsoft's Direct3D. If you're new to 3D work, or if you want more details on Fastgraph's 3D features, we recommend looking at the Fastgraph 6.0 3D tutorial.

Fastgraph 6.0 uses a new floating point 3D geometry system. The new geometry system uses floating point math (instead of the slower and more cumbersome fixed point math of Fastgraph 5.x). It is designed to use a left-handed 3D coordinate system for compatibility with Direct3D.

Fastgraph's texture mapping capabilities have been enhanced significantly. While Fastgraph 5.x provided linear texture mapping, Fastgraph 6.0 adds perspective texture mapping, texture clipping, transparent texels, plus support for Direct3D managed textures. And the new texture map management functions make it easier to work with texture maps in Fastgraph programs.

Fastgraph 6.0 adds support for z-buffering, a technique for determining what parts of a 3D object are visible. Z-buffer management functions let you create, open, and free z-buffer surfaces, plus prepare a z-buffer for a new animation frame. Fastgraph's native z-buffering uses a clever incremental depth technique which eliminates the need to actually clear out the z-buffer after every frame.

The new fg_3Dpov() function defines the viewer's position and orientation in 3D world space.

Simplified 3D functions let you draw texture-mapped, shaded, filled, or wireframe polygons, as well as 3D lines. With the simplified functions, you don't need to worry about things like transformation matrices, 3D clipping, and projection. You merely call fg_3Drenderstate() to specify how Fastgraph should draw 3D objects (for example, with z-buffering and 3D clipping) and then draw each object in 3D space with Fastgraph's 3D polygon or line-drawing functions.

If you perform your own transformation, clipping, and projection of 3D objects, you can use Fastgraph's low-level 3D functions to display the projected objects. Specialized functions are provided for drawing texture-mapped, shaded, and filled polygons, with and without z-buffering. Other low-level 3D functions perform transformation, 3D clipping, and projection. For example, you could transform and project your 3D objects yourself, but let Fastgraph apply the 3D clipping.

All Fastgraph 5.x 3D functions are still included in Fastgraph 6.0 as legacy functions.

DirectDraw and Direct3D

Fastgraph offers 3D rendering through Direct3D hardware acceleration, Direct3D software rendering, or Fastgraph's own 3D rendering. As you might expect, Direct3D hardware acceleration is very fast, but its software rendering is rather slow, often unbearably slow. Fastgraph includes its own 3D software rendering that is only slightly slower than Direct3D hardware acceleration (and sometimes even faster). This lets you write a DirectX application that will use Direct3D hardware acceleration if available, but if not, use Fastgraph's 3D software rendering without sacrificing too much in terms of 3D performance.

Fastgraph's DirectX libraries now offer DirectX version control. By default, Fastgraph will use the highest supported version of DirectX on the user's system, subject to any restrictions defined by the new fg_ddsetversion() function. The new fg_ddgetversion() function returns the DirectX version number an application is using.

The fg_ddsetup() "attached surface count" parameter has changed to a series of flags that specifies how we wish to use DirectX. This will not break any Fastgraph 5.x code, as the flag values for blitting and flipping are respectively 0 and 1.

For full screen DirectX programs that use a true color display mode, a new fg_ddsetup() flag specifies if we want to try the alternate true color bit depth if the requested true color bit depth is unavailable.

In Fastgraph's DirectX libraries, the fg_vbinit() return value indicates how Fastgraph is using DirectX. You can also determine this by calling the new fg_ddusage() function.

The fg_clip2vb(), fg_vb2clip(), and fg_vbprint() functions are now supported in Fastgraph's DirectX libraries.

The new fg_gdiflip() function flips to the GDI drawing surface. This is useful for displaying a message box or other GDI object in a DirectX page flipping program.

The new fg_ddsetblt() function lets you specify if certain functions in Fastgraph's DirectX libraries use their own native code, or if they use the DirectX Blt() or BltFast() blitting methods. By default, the affected functions use the DirectX blitting methods.

The new fg_ddsetobj() and fg_ddapply() functions provide better support for DirectDraw and Direct3D objects created externally.

Programs linked with Fastgraph's DirectX libraries no longer need to link with the DDRAW.LIB import library.

Fastgraph's DirectX libraries now require DirectX 2.0 or later for DirectDraw, and DirectX 5.0 or later for Direct3D.

New Virtual Buffer Features

The maximum number of virtual buffers has been increased from 32 to 256.

The fg_vbfree() function now accepts a negative parameter to free all virtual buffers.

The new fg_gethcbpp() function returns the color depth of a high color virtual buffer. For Fastgraph's native libraries, fg_gethcbpp() always returns 16. For Fastgraph's DirectX libraries, fg_gethcbpp() returns 16 if the DirectX implementation uses the 5/6/5 high color pixel format, or 15 if it uses the 5/5/5 format.

The new fg_vbtzcopy() function is similar to the more general fg_vbtccopy() function, but it only treats zero pixels as transparent. Using fg_vbtzcopy() is considerably faster than fg_vbtccopy(), especially with high color or true color virtual buffers.

The fg_vbaddr() function returns the address of the specified virtual buffer when using Fastgraph's native libraries, just as it did in Fastgraph 5.x. But when using Fastgraph's DirectX libraries, fg_vbaddr() now returns the pointer to the DirectDrawSurface object for the specified virtual buffer. You can still use fg_ddlock() to obtain the virtual buffer's address with Fastgraph's DirectX libraries.

New and Enhanced Image File Functions

Fastgraph's new AVI file support includes the ability to play AVI files with a single call to fg_showavi(). There are also low-level functions to play AVI files one frame at a time, AVI helper functions similar to those provided for other image files, plus functions to create AVI files.

The fg_bmppal() and fg_pcxpal() functions now accept a NULL value for the RGB array. In this case, the functions return the number of colors in the image palette, but no palette data.

The fg_showjpeg() function now manages the JPEG internal buffer memory instead of using fg_jpegbuf() and fg_jpegmem(). The fg_jpegbuf() and fg_jpegmem() functions are still included in Fastgraph for source code compatibility, but they just return without doing anything.

Fastgraph now defines symbolic constants for the fg_showxxx() flags parameter.

The fg_showbmp() and fg_showjpeg() functions now work with files that extend beyond the right or bottom edges of a virtual buffer, just as fg_showpcx() does.

The fg_makebmp(), fg_makepcx(), fg_showbmp(), and fg_showpcx() functions now support arbitrary-width image files. In Fastgraph 5.x, the image width was limited to 10K bytes.

New Image Processing Features

Fastgraph 6.0 includes a comprehensive suite of alpha blending functions. You can blend single color values, direct color bitmaps, or direct color virtual buffers. For bitmaps and virtual buffers, you can blend with constant or variable opacities.

New functions are provided for four popular image processing transforms (grayscale, photo-inversion, contrast enhancement, and gamma correction). You can apply these transforms to a series of RGB values, a direct color bitmap, or any rectangular subset of a direct color virtual buffer.

New Bitmap Functions

Fastgraph's new bitmap sections let you work with subsets of 256-color or direct color bitmaps. Functions are provided for extracting a bitmap section from an existing bitmap, and also for inserting a bitmap section into another larger bitmap.

The new fg_transdcb() function converts direct color bitmaps between the true color, 5/6/5 high color, and 5/5/5 high color formats.

Other Enhancements to Existing Functions

The fg_maprgb() function now works like fg_findrgb() when using a 256-color virtual buffer.

The fg_polyfill() function no longer uses a work array, so you can now pass NULL as the second fg_polyfill() parameter.

The fg_measure() and fg_stall() functions have been rewritten to work with faster processors.

Updates to Fastgraph Utilities

The WinPal and WinMatch utilities are now supplied as Win32 console programs instead of DOS applications.

Win16 Support Discontinued

Win16 support has been discontinued. The Fastgraph 5.x code shared between 16-bit and 32-bit platforms has been replaced with pure 32-bit code, hand optimized for the Pentium processor family. The Fastgraph 5.02 Win16 distribution is included on the Fastgraph 6.0 CD for customers who must continue maintaining 16-bit Windows applications.

Compiler Support

New compilers supported in Fastgraph 6.0:
   Microsoft Visual C++ .NET (added in Fastgraph 6.03)
   Microsoft Visual C# .NET (added in Fastgraph 6.03)
   Microsoft Visual Basic .NET (added in Fastgraph 6.03)
   PowerBASIC

Win32 compilers supported in Fastgraph 5.x but not 6.0:
   Microsoft Fortran PowerStation

Since Fastgraph 6.0 is purely a Win32 product, support for Win16-only compilers has been dropped. The Win16 compilers no longer supported are:
   Borland C++ 3.x or earlier
   Borland Pascal 7
   Delphi 1.0
   Visual C++ 1.x
   Turbo C++ for Windows
   Turbo Pascal for Windows

Changes to Delphi Unit Files

Separate FGworld and FGworldD units are no longer supplied for Delphi, as the functions in these unit files have been integrated into the FGwin and FGwinD units. Delphi programs that use either FGworld or FGworldD should simply remove these unit references from their uses statements.

New Features in Fastgraph/Fonts 6.0

Win16 support has been discontinued. The Fastgraph/Fonts 5.x code shared between 16-bit and 32-bit platforms has been replaced with pure 32-bit code, hand optimized for the Pentium processor family. The Fastgraph/Fonts 5.02 Win16 distribution is included with Fastgraph/Fonts 6.0 for customers who must continue maintaining 16-bit Windows applications.

The maximum number of fonts you can load simultaneously has been increased from 32 to 256.

Fastgraph/Fonts 6.0 includes a new version of the FGFedit utility. The new FGFedit includes the ability to work with larger-size glyphs, adds a "recent file" list, and preserves options settings through the Windows registry.

New Features in Fastgraph/Image 6.0

Win16 support has been discontinued. The Fastgraph/Image 5.x code shared between 16-bit and 32-bit platforms has been replaced with pure 32-bit code, hand optimized for the Pentium processor family. The Fastgraph/Image 5.02 Win16 distribution is included with Fastgraph/Image 6.0 for customers who must continue maintaining 16-bit Windows applications.

Fastgraph/Image 6.0 adds support for AVI files stored in FGI libraries, with AVI functions analogous to those provided in Fastgraph 6.0.

The fgi_bmppal() and fgi_pcxpal() functions now accept a NULL value for the RGB array. In this case, the functions return the number of colors in the image palette, but no palette data.

Fastgraph/Image 6.0 includes a new version of the FGILIB library management utility, with support added for AVI files.

New Functions in Fastgraph 6.0

fg_3Daxisangle() Rotates viewer around an arbitrary axis through the 3D world space origin.
fg_3Daxisangleobject() Rotates an object around an arbitrary axis through its origin.
fg_3Dbehindviewer() Determines if a 3D world space point is visible.
fg_3Dgetmatrix() Retrieves elements from one of Fastgraph's internal 3D matrices.
fg_3Dgetpov() Returns current point of view (POV) information.
fg_3Dline() Draws a line defined in 3D world space.
fg_3Dlookat() Defines viewer's position and orientation in 3D world space.
fg_3Dmove() Moves the viewer to the specified 3D world space position.
fg_3Dmoveforward() Moves the viewer's position forward or backward.
fg_3Dmoveforwardobject() Moves an object forward or backward.
fg_3Dmoveobject() Moves an object to the specified 3D world space position.
fg_3Dmoveright() Moves the viewer's position left or right.
fg_3Dmoverightobject() Moves an object left or right.
fg_3Dmoveup() Moves the viewer's position up or down.
fg_3Dmoveupobject() Moves an object up or down.
fg_3Dpolygon() Draws a single-color polygon defined in 3D world space.
fg_3Dpolygonobject() Draws a single-color polygon defined in 3D object space.
fg_3Dpov() Defines viewer's position and orientation in 3D world space.
fg_3Dproject() Projects a series of transformed 3D points to 2D screen space points.
fg_3Drenderstate() Defines render state for 3D line and 3D polygon drawing functions.
fg_3Droll() Rotates the viewer's forward orientation.
fg_3Drollobject() Rotates an object clockwise or counterclockwise.
fg_3Drotate() Rotates the viewer's orientation.
fg_3Drotateobject() Rotates an object's orientation.
fg_3Drotateright() Rotates the viewer's orientation left or right.
fg_3Drotaterightobject() Rotates an object left or right.
fg_3Drotateup() Rotates the viewer's orientation up or down.
fg_3Drotateupobject() Rotates an object up or down.
fg_3Dsetmatrix() Sets elements in one of Fastgraph's internal 3D matrices.
fg_3Dsetobject() Define a 3D object's position in world space and its rotation about its own object space axes.
fg_3Dsetzclip() Defines the near and far z clipping planes.
fg_3Dshade() Draws a Gouraud-shaded polygon defined in 3D world space.
fg_3Dshadeobject() Draws a Gouraud-shaded polygon defined in 3D object space.
fg_3Dtexturemap() Draws a texture-mapped polygon defined in 3D world space.
fg_3Dtexturemapobject() Draws a texture-mapped polygon defined in 3D object space.
fg_3Dtransform() Transforms a series of 3D (x,y,z) points from world space to view space.
fg_3Dtransformobject() Transforms a series of 3D (x,y,z) points from object space to view space.
fg_3Dupvector() Defines the 3D geometry system's up vector.
fg_3Dviewport() Defines the 3D viewport and the corresponding projection ratio.
fg_3Dzclip() Clips a series of 3D (x,y,z) polygon vertices against the z plane clipping value.
fg_3Dzcliprgb() Clips 3D polygon vertices and corresponding RGB shading values.
fg_3Dzcliptm() Clips 3D polygon vertices and corresponding 2D texture map coordinates.
fg_avidone() Closes the AVI file associated with the specified context descriptor.
fg_aviframe() Writes one frame to an AVI file.
fg_avihead() Reads an AVI file header.
fg_avimake() Creates an empty AVI file that will be built with fg_aviframe().
fg_aviopen() Opens an AVI file for reading.
fg_avipal() Retrieves the palette data from an AVI file.
fg_aviplay() Plays the next one or more individual frames in an AVI file.
fg_avisize() Returns the AVI image dimensions.
fg_aviskip() Advances one or more frames in an AVI file.
fg_blend() Computes an alpha-blended color value.
fg_blend50() Computes a 50% alpha-blended color value.
fg_blenddcb() Computes an alpha-blended bitmap with constant opacity.
fg_blendvar() Computes an alpha-blended bitmap with variable opacity.
fg_blendvb() Creates alpha-blended image with constant opacity in the active virtual buffer.
fg_blendvbv() Creates alpha-blended image with variable opacity in the active virtual buffer.
fg_contdcb() Applies a contrast enhancement transform to a direct color bitmap.
fg_contrgb() Applies a contrast enhancement transform to a series of RGB color triples.
fg_contvb() Applies a contrast enhancement transform to the active virtual buffer.
fg_cut() Extracts a 256-color bitmap section from a 256-color bitmap.
fg_cutdcb() Extracts a direct color bitmap section from a direct color bitmap.
fg_ddapply() Activates Fastgraph's DirectX settings defined through fg_ddsetobj() (DirectX only).
fg_ddframe() Begins or ends a Direct3D rendering sequence (DirectX only).
fg_ddgetversion() Returns the DirectX version number Fastgraph is using (DirectX only).
fg_ddsetblt() Defines if certain Fastgraph functions use their own native code, or use DirectX blitting methods (DirectX only).
fg_ddsetobj() Defines a pointer to an externally created DirectX object (DirectX only).
fg_ddsetversion() Defines highest and lowest supported DirectX versions under which the program can run.
fg_ddusage() Returns a value indicating how Fastgraph is using DirectX (DirectX only).
fg_drawz() Draws a projected z-buffered line.
fg_gammadcb() Applies a gamma correction transform to a direct color bitmap.
fg_gammargb() Applies a gamma correction transform to a series of RGB color triples.
fg_gammavb() Applies a gamma correction transform to the active virtual buffer.
fg_gdiflip() Makes the GDI drawing surface the visible surface (DirectX only).
fg_gethcbpp() Returns the color depth for high color virtual buffers.
fg_gouraudz() Draws a projected z-buffered Gouraud-shaded convex polygon.
fg_graydcb() Applies a grayscale transform to a direct color bitmap.
fg_grayrgb() Applies a grayscale transform to a series of RGB color triples.
fg_grayvb() Applies a grayscale transform to the active virtual buffer.
fg_opacity() Defines the foreground opacity for the alpha blending functions.
fg_paste() Inserts a 256-color bitmap section into a 256-color bitmap.
fg_pastedcb() Inserts a direct color bitmap section into a direct color bitmap.
fg_photodcb() Applies a photo-inversion transform to a direct color bitmap.
fg_photorgb() Applies a photo-inversion transform to a series of RGB color triples.
fg_photovb() Applies a photo-inversion transform to the active virtual buffer.
fg_polyfilz() Draws a projected z-buffered filled convex polygon.
fg_showavi() Plays an AVI file.
fg_texmapp() Draws a projected perspective corrected texture-mapped convex polygon.
fg_texmappz() Draws a projected z-buffered perspective corrected texture-mapped convex polygon.
fg_texmapz() Draws a projected z-buffered texture-mapped convex polygon.
fg_tmdefine() Assigns a handle to a texture map.
fg_tmevict() Moves all Direct3D managed textures from video memory to system memory.
fg_tmfree() Releases a texture handle.
fg_tminit() Initializes Fastgraph's texture map manager.
fg_tmselect() Makes the specified texture map the active texture map.
fg_tmspan() Defines the span size in pixels for perspective texture mapping.
fg_tmtransparency() Defines the transparency state of zero-value pixels in texture maps.
fg_transdcb() Translates a direct color bitmap to another color depth.
fg_trig() Returns the floating point cosine and sine of a given angle.
fg_vbtzcopy() Like fg_vbtccopy() but only treats zero-valued pixels transparent.
fg_zballoc() Creates a z-buffer.
fg_zbframe() Prepares the active z-buffer for the next animation frame.
fg_zbfree() Frees the memory allocated to the specified z-buffer.
fg_zbopen() Makes an existing z-buffer the active z-buffer.

New Functions in Fastgraph/Image 6.0

fgi_avidone() Closes the AVI file associated with the specified context descriptor.
fgi_avihead() Reads an AVI file header from an AVI file stored in an FGI library.
fgi_aviopen() Opens an AVI file in an FGI library for reading.
fgi_avipal() Retrieves the palette from an AVI file stored in an FGI library.
fgi_showavi() Plays an AVI file stored in an FGI library.

 

Product Catalog | Price List | Windows FAQ | Windows CE FAQ | DOS FAQ
Demos | Patches | Games | More Games | Diana's Reprints
Quotes | Links | Contact Information | Orders
Fastgraph Home Page

 

Copyright © 2007 Ted Gruber Software, Inc. All Rights Reserved.