Tutorial: Draw and perform vysnc operation using windows
This simple sample application uses three windows to illustrate a basic drawing and vsync operation. The sample provides reusable functions that are called in the application to create and initialize windows. The sample also includes a complete event loop that you can use in your own application.
In the sample application, an hourglass is placed in the top left corner of an application window while a vertical bar sweeps from left to right across the screen. The background window is of type SCREEN_APPLICATION_WINDOW, while the hourglass and the bar are implemented as windows of type SCREEN_CHILD_WINDOW. The application is shown below:
The sample vsync application
Each window in the application is given an ID at creation time. The ID is used at runtime to determine which window dispatched the event.