Determine the hardware capabilities
int PgGetGraphicsHWCaps (PgHWCaps_t *caps );
- A pointer to a
structure that the function can fill with the hardware capabilities;
This function determines the hardware capabilities and fills out the
structure pointed to by caps.
- You must call
before calling this function.
- If you have more than one card in your system,
you must target this function at a specific card by calling
- PgGetGraphicsHWCaps() blocks until the operation is complete.
The PgHWCaps_t structure includes at least the following
unsigned short current_video_mode;
unsigned char current_rrate;
unsigned char current_mode_flags;
unsigned long rasteriser_version;
unsigned long driver_version;
unsigned long total_video_ram;
unsigned long total_crtc_ram;
unsigned long total_non_crtc_ram;
unsigned long currently_available_video_ram;
unsigned long currently_available_crtc_ram;
unsigned long currently_available_non_crtc_ram;
unsigned long card_capabilities;
unsigned short min_pitch;
unsigned short max_pitch;
unsigned short mult_pitch;
unsigned short reserved;
unsigned char chip_name;
The members are as follows:
- The number of the mode the video card is currently in.
- Current refresh rate, in Hz.
A value of 0 means the refresh rate is the default or not supported.
- Current flags for the mode. The only value currently is
meaning that double buffering is being used.
- The version of the device-independent portion of the driver.
- The version of the device-dependent portion of the driver.
- The amount of video ram on this card.
- The amount of RAM allocated to the CRTC-safe area.
- The amount of RAM allocated to the non-CRTC-safe area.
- The total currently available video memory.
- The currently available CRTC-safe video memory.
- The currently available non-CRTC-safe video memory.
- The capabilities of this video card — see below.
- The minimum number of bytes per scan line for any offscreen context.
The driver already makes sure that any request for offscreen memory is
at least this big;
this member is here just to help with debugging and to help applications
make efficient use of the video memory (for example, some chips have
a minimum pitch of 1024)
- The largest number of bytes per scan line that the driver accepts.
- The number of bytes per scan line must be a multiple of this value
(the driver ensures this, too).
- The name of this chipset.
||The pitch values can change for each mode; you should use them only after
changing to the desired mode.|
The general hardware feature set (card_capabilities) are:
- This video card has a 2D accelerator.
- This video card has video-overlay support.
- This video card can use offscreen video memory.
- This video card can use a linear frame buffer.
||These fields only say that it is possible to get these features on this
You still need to check the mode capabilities to see if they're available in
any given mode.|
- An error occurred.
in the Raw Drawing and Animation chapter of the
Photon Programmer's Guide