Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 8

PgGetGraphicsHWCaps()

Determine the hardware capabilities

Synopsis:

int PgGetGraphicsHWCaps (PgHWCaps_t *caps );

Arguments:

caps
A pointer to a PgHWCaps_t structure that the function can fill with the hardware capabilities; see below.

Library:

ph

Description:

This function determines the hardware capabilities and fills out the structure pointed to by caps.


Note:
  • You must call PhAttach() 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 PdSetTargetDevice().
  • PgGetGraphicsHWCaps() blocks until the operation is complete.

PgHWCaps_t

The PgHWCaps_t structure includes at least the following members:

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[40];

The members are as follows:

current_video_mode
The number of the mode the video card is currently in.
current_rrate
Current refresh rate, in Hz. A value of 0 means the refresh rate is the default or not supported.
current_mode_flags
Current flags for the mode. The only value currently is Pg_CM_DOUBLE_BUFFERED, meaning that double buffering is being used.
rasteriser_version
The version of the device-independent portion of the driver.
driver_version
The version of the device-dependent portion of the driver.
total_video_ram
The amount of video ram on this card.
total_crtc_ram
The amount of RAM allocated to the CRTC-safe area.
total_non_crtc_ram
The amount of RAM allocated to the non-CRTC-safe area.
currently_available_video_ram
The total currently available video memory.
currently_available_crtc_ram
The currently available CRTC-safe video memory.
currently_available_non_crtc_ram
The currently available non-CRTC-safe video memory.
card_capabilities
The capabilities of this video card — see below.
min_pitch
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)
max_pitch
The largest number of bytes per scan line that the driver accepts.
mult_pitch
The number of bytes per scan line must be a multiple of this value (the driver ensures this, too).
chip_name[40]
The name of this chipset.

Note: 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:

Pg_2D_ACCELERATOR
This video card has a 2D accelerator.
Pg_VIDEO_OVERLAY
This video card has video-overlay support.
Pg_OFFSCREEN
This video card can use offscreen video memory.
Pg_LINEAR_FRAME_BUFFER_CAPABLE
This video card can use a linear frame buffer.

Note: These fields only say that it is possible to get these features on this video card. You still need to check the mode capabilities to see if they're available in any given mode.

Returns:

0
Success.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdSetTargetDevice(), PgGetVideoMode(), PgGetVideoModeInfo(), PgGetVideoModeList(), PgSetVideoMode()

Video modes in the Raw Drawing and Animation chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 300

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pggetgraphicshwcaps.html on line 300