|
|
|
|
MGL_createScrollingDC
Create a new hardware scrolling display device context.
Declaration
MGLDC * MGLAPI MGL_createScrollingDC(
int mode,
int virtualX,
int virtualY,
int numBuffers,
int refreshRate)
Prototype In
mgraph.h
Parameters
mode |
Graphics mode to initialise |
virtualX |
Virtual width of desired mode |
virtualY |
Virtual height of desired mode |
numBuffers |
Number of buffers for multibuffering |
refreshRate |
Requested refresh rate for the graphics mode |
Return Value
Pointer to the newly created hardware scrolling display device context, NULL on failure.
Description
Creates a new scrolling display device context for drawing information directly to the hardware display device in fullscreen graphics modes. Essentially this function is identical to MGL_createDisplayDC, however hardware scrolling (or panning) is supported. Some hardware devices may not support hardware scrolling, in which case this function will fail and return a NULL. In these cases you should provide an alternative method of scrolling the display, such as drawing to a memory device context and copying the appropriate portion of the image to the display with MGL_bitBlt.
When the device context is created, the MGL will start the graphics mode specified in the mode parameter and initialize the specific device driver. If any prior display device contexts exist, they will all be destroyed before switching to the new display mode.
Once you have created a hardware scrolling device context, the display starting coordinate will be set to (0,0) within the virtual image. To hardware pan around within the virtual image, you can use the MGL_setDisplayStart function to change the display starting x and y coordinates.
The refresh rate value that you pass in is a suggested value in that the MGL will attempt to set the refresh rate to this value, however if the hardware does not support that refresh rate the next lowest available refresh rate will be used instead. In some situations where no refresh rate control is available, the value will be ignored and the adapter default refresh rate will be used. If you dont care about the refresh rate and want to use the adapter default setting, pass in a value of MGL_DEFAULT_REFRESH.
Note: To set an interlaced refresh rate, pass in the refresh rate as a negative value. Ie: Pass a value of -87 for 87Hz interlaced.
See Also
MGL_createMemoryDC, MGL_createDisplayDC, MGL_createStereoDisplayDC, MGL_destroyDC
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com