Figure Accessing the Linear Frame Buffer.2 Frame buffer writes: encoding the location of the origin as the sign of the strideInBytes.
If the image you want to write into the linear frame buffer is defined with the origin in the lower left corner, you can use a negative strideInBytes to compute addresses, as shown in part (a) below. If the origin is in the upper left corner, use a positive strideInBytes, as shown in part (b). The bottom half of each diagram shows the pixel copy in progress.
Thus, a rectangle of srcFormat pixels pointed to by data and defined by width, height, and strideInBytes will be copied into buffer at the location (xStart, yStart). Note that not all 3Dfx graphics subsystems support all source image formats; grLfbWriteRegion() will fail if the source format is not supported.
Chapter 12. Housekeeping Routines
Glide provides a collection of routines that return information about the system, the software, and the scene being rendered.
You will learn how to
retrieve additional system configuration information: the current version of Glide, the number of SST subsystems present, the size of the display screen
change the location of the y origin
check the system status
utilize two display monitors
monitor system performance by learning the fate of pixels in the pixel pipeline
The first three chapters of this manual present some routines that retrieve and use system configuration information. The remaining routines are presented here.
1Which Glide Release?
When your customer service representative asks you which version of Glide you are using, you might whip up a little program that calls grGlideGetVersion().
void grGlideGetVersion( char version[80] )
A null-terminated string that describes the Glide version is returned in version. For example, the string “Glide Version 2.2” is returned by the Glide software described in this manual.
Share with your friends: |