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