"sync to vblank will sync swapping buffer with the screen frame rate, but that's not the original question.<br>to my knowledge, there is no possibility to sync gem rendering with the screen frame rate.<br>if you fix both at 60Hz, you can have jitter (not a lot, but some)."
<br><br>You are not technically syncing gem to the screen frame rate. You are syncing the open gl redraw to the framerate. The GPU takes care of that.<br><br><div><span class="gmail_quote">On 10/11/07, <b class="gmail_sendername">
cyrille henry</b> <<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Batuhan Bozkurt a écrit :<br>> Roman Haefeli wrote:<br>>> On Thu, 2007-10-11 at 18:55 +0200, IOhannes m zmoelnig wrote:<br>>><br>>><br>>>> the next thing is to synchronize your trigger events with the
<br>>>> gem-rendering.<br>>>><br>>>><br>>><br>>> while we are at: is there some way to hardsync Gem's framerate with the<br>>> screen refresh rate? i noticed, that when using [gemwin
<br>>> <screenrefreshrate>], both are quite<br>>> in synch, but not really. i made a patch, that shows a part of an image<br>>> with a very width. now, when scrolling the image from right to left with
<br>>> a counter, that is hardsynced to [gemhead], i still see some glitches,<br>>> the scrolling is not stable in movement. wouldn't it be cool, to have<br>>> an option for [gemwin], that automatically
<br>>> hardsyncs it to screen refresh rate? [gemwin -1] ? is it possible at all<br>>> to get 'screen clock' (i don't know how this is called correctly) on<br>>> every os?<br>>><br>>> roman
<br>>><br>>><br>> I think this is called vsync(and seen as an option on some systems as<br>> ''sync to vblank'').<br>> And afaik this is not just tied to the software that is rendering things
<br>> to screen but to the graphics card driver itself. I'm very frustrated<br>> about this in linux and windows.<br>well,<br>sync to vblank will sync swapping buffer with the screen frame rate, but that's not the original question.
<br>to my knowledge, there is no possibility to sync gem rendering with the screen frame rate.<br>if you fix both at 60Hz, you can have jitter (not a lot, but some).<br><br>><br>> First and foremost, Windows XP does not have vsync enabled on desktop,
<br>> so when you move a window around you will see tearing on sides of<br>> windows. This is not enabled in XP and I don't know a way of enabling it<br>> actually. I've heard that there was a beta of XP where vsync was enabled
<br>> as default so I think this is a choice of developers(as it affects<br>> performance afair).<br>> And GEM is not synced too. You can try with the attached patch. I found<br>> no ways of enabling it for OpenGL applications. (I think vista has it
<br>> enabled by default, did not try it though)<br>><br>> In linux, that is another story. Vsync is not enabled by default. You<br>> need to have direct rendering enabled to have vsync enabled. If you have<br>
> a ATI graphics card with closed source drivers and you are using<br>> compositing(via XGL), that is not possible. If you are not using XGL, it<br>> is not enabled as default. If you have direct rendering enabled, you can
<br>> use a tool called ''driconf'' to enable vsync. When you enable it,<br>> regular desktop is still not synced(move windows and you will see<br>> tearing). But GEM(and opengl) will be synced as they are using direct
<br>> rendering. So you will be fine.<br>well, with nvidia driver, you just have to click on the sincr to vbank toggle box in order to enable it.<br>(and select on wich screen to sync in case of diferent screen frame rate)
<br><br>cyrille<br><br>><br>> On Macos, vsync is enabled both on desktop and opengl by default. It<br>> looks smooth and nice, because of that. So you won't see any tearing<br>> whatsoever on your desktop or in GEM. This is really nice.
<br>><br>> You can see the attached example to see if you have vsync on or off. If<br>> you are synced, the bar will move smoothly. If not, you will see tearing<br>> in movement.<br>><br>> In my experiments, XP had tearing and I had no fix, in Ubuntu Linux,
<br>> tearing by default but can be fixed by driconf, and in osx there were no<br>> problems.<br>><br>> Batuhan<br>><br>><br>> ------------------------------------------------------------------------<br>
><br>> #N canvas 0 29 753 593 10;<br>> #N canvas 6 63 454 304 gemwin 0;<br>> #X obj 67 89 outlet;<br>> #X obj 67 10 inlet;<br>> #X obj 67 41 route create;<br>> #X msg 67 70 set destroy;<br>> #X msg 142 68 set create;
<br>> #X msg 198 112 destroy;<br>> #X msg 132 112 create \, 1;<br>> #X obj 132 136 gemwin 60;<br>> #X connect 1 0 2 0;<br>> #X connect 2 0 3 0;<br>> #X connect 2 0 6 0;<br>> #X connect 2 1 4 0;<br>> #X connect 2 1 5 0;
<br>> #X connect 3 0 0 0;<br>> #X connect 4 0 0 0;<br>> #X connect 5 0 7 0;<br>> #X connect 6 0 7 0;<br>> #X restore 39 82 pd gemwin;<br>> #X msg 39 63 create;<br>> #X obj 45 179 gemhead;<br>> #X obj 45 211 rotate 0 0 0 1;
<br>> #X obj 45 250 translateXYZ;<br>> #X obj 190 210 line;<br>> #X obj 204 87 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1<br>> -1;<br>> #X obj 202 110 t b b;<br>> #X msg 189 176 4 1000;<br>> #X msg 255 189 -4 1000;
<br>> #X obj 241 143 delay 1000;<br>> #X obj 330 166 delay 1000;<br>> #X obj 47 342 cuboid 0.06 4 0;<br>> #X text 199 61 bangme;<br>> #X connect 0 0 1 0;<br>> #X connect 1 0 0 0;<br>> #X connect 2 0 3 0;
<br>> #X connect 3 0 4 0;<br>> #X connect 4 0 12 0;<br>> #X connect 5 0 4 1;<br>> #X connect 6 0 7 0;<br>> #X connect 7 0 8 0;<br>> #X connect 7 1 10 0;<br>> #X connect 8 0 5 0;<br>> #X connect 9 0 5 0;
<br>> #X connect 10 0 9 0;<br>> #X connect 10 0 11 0;<br>> #X connect 11 0 6 0;<br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________
<br>> <a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
<br><br>_______________________________________________<br><a href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list<br>UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list">
http://lists.puredata.info/listinfo/pd-list</a><br></blockquote></div><br>