Brian Furtaw (brian++at++hotsauce.clubfed.sgi.com)
Thu, 14 Sep 1995 07:21:09 -0700
Dirk,
Try this to get you by until a permanent solution comes out with 6.2.
Create some semaphores:
usptr_t* arena = usinit("/usr/tmp/swap_arena");
usema_t* pipe0ready = usnewsema(arena, 0);
usema_t* pipe1ready = usnewsema(arena, 0);
After the process for pipe 0 finishes its frame, it signals
its completion and waits for pipe1. When pipe1 is also
ready, pipe0 swaps:
usvsema(pipe0ready);
uspsema(pipe1ready);
glXSwapBuffers(dpy, drawable);
The process for pipe 1 does the converse:
usvsema(pipe1ready);
uspsema(pipe0ready);
glXSwapBuffers(dpy, drawable);
It's not perfect synchronization but it will disallow one of the pipes to
proceed with swapping unless the other pipe is also ready to swap. This should
work for you.
Brian
-- o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-oBrian Furtaw (brian++at++sgi.com) RSE Graphics/Communications Office: (301) 572-3293 Silver Spring, MD Fax: (301) 572-3280
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:53 PDT