Chapter 5
Sun XVR-1000 Graphics Accelerator Frame Locking and Buffer Swap Synchronization
41
Creating a Multiscreen Application
The following is a programming example of how to create a Buffer Swap
Synchronization (multiscreen) application.
Main program:
1. Create n full screen windows, one per screen.
2. Create n rendering threads and associate one thread per screen.
3. Create a master thread to synchronize rendering threads.
4. Execute main window system event loop.
Master Thread run method:
1. Do the following in a loop:
a. Notify all rendering threads to render a frame (possibly in response to an
event).
b. Wait for all rendering threads to finish rendering.
c. Notify all rendering threads to swap buffers.
d. Wait for all rendering threads to finish swapping.
Render Thread(s) run method:
1. Create OpenGL context for this thread’s window.
2. Make context current to this thread.
3. Initialize OpenGL context state.
4. Do the following in a loop:
a. Wait for master thread notification.
b. Render image to back buffer for this screen.
c. Notify master thread that this thread is done rendering.
d. Wait for master thread notification.
e. Swap buffers.
f. Notify master thread that this thread is done swapping.
Summary of Contents for XVR-1000
Page 6: ...vi Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 10: ...x Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 12: ...xii Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 14: ...xiv Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 18: ...xviii Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 26: ...8 Sun XVR 1000 Graphics Accelerator Installation and User s Guide April 2002 ...
Page 38: ...20 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 56: ...38 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 66: ...48 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 76: ...58 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 78: ...60 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...
Page 82: ...64 Sun XVR 1000 Graphics Accelerator Installation and User s Guide June 2002 ...