Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PgSetDrawBufferSize, PgSetDrawBufferSizeCx

PgSetDrawBufferSize, PgSetDrawBufferSizeCx

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PgSetDrawBufferSize(), PgSetDrawBufferSizeCx()

Resize a draw buffer

Synopsis:

int PgSetDrawBufferSize(
        unsigned short cmd_buf_len );

int PgSetDrawBufferSizeCx(
        void *dc,
        unsigned short cmd_buf_len );

Library:

ph

Description:

These functions resize the current draw buffer. The default size, allocated with every PhAttach(), is at least 4K. If cmd_buf_len is less than 1K, then 4K is allocated. The draw buffer stores all drawing data except for data stored in shared memory.

If the draw buffer contains unflushed data when these functions are called, the function will flush the data before reallocating the buffer.

PgSetDrawBufferSize() works on the current draw context, while you can specify the draw context dc for PgSetDrawBufferSizeCx().

Returns:

0
Success.
-1
An error occurred.

Examples:

// Allocate a 16K draw buffer
PgSetDrawBufferSize( 16 * 1024 );

Note: To reduce the memory requirements of the graphics driver, you should limit draw buffers to 16K.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgClearDrawBuffer*(), PgFlush*(), PhAttach(), PhGetMsgSize()