[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

gsync Subroutine

Purpose

Waits for a vertical retrace period.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void gsync( )

FORTRAN Syntax

SUBROUTINE GSYNC

Description

The gsync subroutine waits for the next vertical retrace. Because this subroutine does not return until vertical retrace begins, the calling process is effectively blocked until that time.

This subroutine is useful for pacing the drawing when in single buffer mode. If the amount of drawing to be done is small, this subroutine can be used to achieve a limited amount of smooth animation in single buffer mode. For high-quality, smooth-animation, double-buffer mode should be used with the swapbuffers subroutine.

Note: This subroutine cannot be used to add to a display list.

Example

The worms.c example C language program uses the gsync subroutine to help smooth the display while it is changing the frame buffer.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

The POWERgraphics GXT1000 does not support the gsync subroutine.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Setting the display mode to double buffer mode with the doublebuffer subroutine.

Setting the display mode to single buffer mode with the singlebuffer subroutine.

Exchanging the front and back buffers in double buffer mode with the swapbuffers subroutine.

Understanding the Hardware Used by GL and Working in Color Map and RGB Modes.

Creating Animated Scenes.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]