Table of Contents Glide Programming Guide



Download 6.22 Mb.
Page90/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   86   87   88   89   90   91   92   93   ...   106
GLIDEPGM

2How Big a Screen?


grSstScreenHeight() and grSstScreenWidth() return the height and width in pixels, respectively, of the current SST display buffer.
int grSstScreenHeight( void )

int grSstScreenWidth( void )


3Changing the y Origin


The location of the y origin is initially established as part of the grSstWinOpen() call in the Glide initialization sequence. The initial setting can be overridden later on by calling grSstOrigin().
void grSstOrigin( GrOriginLocation_t origin )

The argument, origin , specifies the direction of the y coordinate axis. GR_ORIGIN_UPPER_LEFT places the screen space origin at the upper left corner of the screen with positive y going down. GR_ORIGIN_LOWER_LEFT places the screen space origin at the lower left corner of the screen with positive y going up.


4Checking System Status


Three Glide routines help you determine the status of the Voodoo Graphics hardware.
void grSstIdle( void )


FxBool grSstIsBusy( void )
grSstIdle() blocks until the Voodoo Graphics subsystem is idle. The system is busy when either the hardware FIFO is not empty or the graphics engine is busy.
The other routine, grSstIsBusy(), is non-blocking. It returns FXTRUE if the Voodoo Graphics subsystem is busy, and FXFALSE otherwise.
You can also look at the contents of the status register in the Voodoo Graphics system by calling grSstStatus().
FxU32 grSstStatus( void )

grSstStatus() returns a 32-bit unsigned integer containing the contents of the status register. The bits within this register are defined in Figure Housekeeping Routines .1.
Figure Housekeeping Routines .1 The Voodoo Graphics status register.




bit

description

5:0

PCI FIFO free space (0x3F=FIFO empty)

6

Vertical retrace (0=vertical retrace active; 1=vertical retrace inactive).

7

Pixelfx graphics engine busy (0=engine idle; 1=engine busy)

8

TMU busy (0=engine idle; 1=engine busy)

9

Voodoo Graphics busy (0=idle; 1=busy)

11:10

Displayed buffer (0=buffer 0; 1=buffer 1; 2=auxiliary buffer; 3=reserved)

27:12

Memory FIFO free space (0xFFFF=FIFO empty)

30:28

Number of swap buffer commands pending

31

PCI interrupt generated (not implemented)



Download 6.22 Mb.

Share with your friends:
1   ...   86   87   88   89   90   91   92   93   ...   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page