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

swapinterval Subroutine

Purpose

Defines a minimum time between buffer swaps.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void swapinterval(Int16 interval )

FORTRAN Syntax

SUBROUTINE SWAPINT(interval)
INTEGER*4 interval
Note: For FORTRAN users, this subroutine accepts long integer parameters (INTEGER*4) when invoked from a FORTRAN program, although it accepts short integers when invoked from a C program. The C and FORTRAN syntax shown here reflect this difference.

Description

The swapinterval subroutine defines a minimum time between buffer swaps. The time is measured in units of vertical retraces, with the default interval being 1. For example, for a swap interval of 5, the system refreshes the screen at least five times between successive buffer swaps.

The swapinterval subroutine changes frames at a steady rate if a new image can be created within one swap interval. This subroutine is valid only in double buffer mode and is ignored in single buffer mode.

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

Parameter

interval Specifies the number of retraces to wait before swapping the front and back buffers.

Implementation Specifics

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

The POWER GXT1000 adapter does not support the swapinterval 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.

Exchanging the front and back buffers with the swapbuffers subroutine.

Understanding the Hardware Used by GL in GL3.2 Version 4 for AIX: Programming Concepts.

Configuring the Frame Buffer and Creating Animated Scenes.


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