[Previous] [Contents] [Index] [Next]

PgSetDrawBufferSize()

Resize a draw buffer

Synopsis:

int PgSetDrawBufferSize( 
        unsigned short cmd_buf_len );

Description:

This function resizes the current draw buffer. The default size, allocated with every PhAttach(), is at least 1K. The draw buffer stores all drawing data except for data stored in shared memory.

If the draw buffer contains unflushed data when this function is called, the function will flush the data before reallocating the buffer.

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()


[Previous] [Contents] [Index] [Next]