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


Home
QNX Community Resources
QNX Documentation Library
PgWaitVSync, PgWaitVSyncCx

PgWaitVSync, PgWaitVSyncCx

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

PgWaitVSync(), PgWaitVSyncCx()

Wait for vertical synchronization

Synopsis:

void PgWaitVSync( void );

void PgWaitVSyncCx( void *dc );

Arguments:

dc
PgWaitVSyncCx() only. A void pointer to any type of draw context. Examples of draw contexts are:

Library:

ph

Description:

These functions insert a "wait for vertical sync" tag into the drawstream. The driver waits until a vertical refresh has started before continuing to render the draw stream.

These functions is available only in direct mode.

PgWaitVSync() works on the current draw context, while you can specify the draw context for PgWaitVSyncCx().

Examples:

PgSetFillColor(Pg_RED);
PgWaitVSync();
PgDrawIRect(0,0,99,99,Pg_DRAW_FILL);
PgSetFillColor(Pg_BLACK);
PgDrawIRect(9,9,89,89,Pg_DRAW_FILL);
PgFlush();  // Wait for Vsync, then draw 2 rects

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgWaitDrawComplete(), PgWaitHWIdle()

"Direct mode" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide