Using Custom Display Modes
Although the SciTech SNAP Graphics Architecture exports a list of
supported display modes, internally there is actually no real concept
of a standard display mode. Instead SciTech SNAP Graphics maintains a
profile of known display modes, and uses that profile to enumerate to
applications what display modes are available. The profile of known
display modes also includes supported refresh rates, and that
information is used to create the GA_modeInfo information
returned by the GetVideoModeInfo function.
When the application calls the regular SetVideoMode function,
internally the drivers end up calling the SetCustomVideoMode function
with the resolution and CRTC timings for the known display mode taken
from the mode profile.
Sometimes special applications may require the need to set a custom
display mode that is not listed in the regular profile of known display
modes. To set a completely custom display mode, you can call the SetCustomVideoMode function
directly and pass in your own set of CRTC timings that match the
display mode of choice (use GA_computeCRTCTimings to
compute the CRTC timings with the GTF formulas). Note however that not
all resolutions can be supported by all hardware (for instance some
hardware requires the X resolution to be on 8 pixel boundaries, some 16
pixel boundaries). In order to determine if a desired custom resolution
is actually supported by the hardware, you should call the GetCustomVideoModeInfo function.
This function will properly round up the resolution parameters as
necessary to support the mode on the underlying hardware.
Note: You can also add a custom display mode to the
default mode profile as an alternative to always calling the SetCustomVideoMode function.
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com