Supported Browsers Home   
MGL_setDefaultPalette Previous   
MGL_setDitherMode Next   
External Functions Up   

MGL_setDisplayStart

Changes the display start address for virtual scrolling.

Declaration

void MGLAPI MGL_setDisplayStart(
    MGLDC *dc,
    int x,
    int y,
    int waitVRT)

Prototype In

mgraph.h

Parameters

dc

Scrolling display device context to change

x

New display start x coordinate

y

New display start y coordinate

waitVRT

Wait for retrace flag (MGL_waitVRTFlagType)

 

Description

This function sets the CRTC display starting address for the hardware scrolling device context to the specified (x,y) coordinate. You can use this routine to implement hardware scrolling or panning by moving the display start address coordinates.

The waitVRT flag is used for synchronizing with the vertical retrace and can be one of the following values:

waitVRT

Meaning

MGL_waitVRT

Set coordinates and update hardware, waiting for a vertical retrace during the update for flicker free panning.

MGL_dontWait

Set coordinates and update hardware, but do not wait for a vertical retrace when changing the hardware start address.

minus1

Set coordinates but don't update hardware display start.

Passing a waitVRT flag of -1 can be used to implement double buffering and hardware scrolling at the same time. To do this you would call this function first to set the display start x and y coordinates without updating the hardware, and then call MGL_setVisualPage to swap display pages and the new hardware start address will then be programmed.

Note:    This function does not allow the MGL_tripleBuffer flag to be passed in. If you are doing triple buffering with virtual scrolling, you must pass a value of -1 in the waitVRT parameter, and then pass a value of MGL_tripleBuffer in the waitVRT parameter of the MGL_setVisualPage function.

See Also

MGL_getDisplayStart, MGL_createScrollingDC

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com