MGL_surfaceAccessType

Return the direct surface access flags.

Declaration

int MGLAPI MGL_surfaceAccessType(
MGLDC *dc)

Prototype In

mgraph.h

Parameters

dc | Device context of interest

Return Value

Direct surface access flags for the device context.

Description

This function returns the direct surface access flags for the specified device context, which can be used to determine if the surface for the device context is directly accessible, and if the surface has been virtualized in software. The access flags returned are enumerated in MGL_surfaceAccessFlagsType.

If the surface access flags is MGL_VIRTUAL_ACCESS, this means that the surface for the device can be directly accessed, however the surface is actually virtualized in software using a page fault handler for SuperVGA devices that do not have a real hardware linear framebuffer. If the surface is virtualized, you must ensure that when you directly access the surface you do so on BYTE, WORD and DWORD aligned boundaries. If you access it on a non-aligned boundary across a page fault, you will cause an infinite page fault loop to occur. If the surface access flags is MGL_NO_ACCESS the framebuffer will be banked and if you wish to rasterize directly to it you will need to use the SVGA_setBank functions to change banks. In banked modes the surface pointer points to the start of the banked framebuffer window (ie: 0xA0000).

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