On Fri, 2007-10-12 at 02:08 +0200, Roman Haefeli wrote:
On Thu, 2007-10-11 at 22:53 +0300, Batuhan Bozkurt wrote:
Roman Haefeli wrote:
On Thu, 2007-10-11 at 18:55 +0200, IOhannes m zmoelnig wrote:
the next thing is to synchronize your trigger events with the gem-rendering.
while we are at: is there some way to hardsync Gem's framerate with the screen refresh rate? i noticed, that when using [gemwin <screenrefreshrate>], both are quite in synch, but not really. i made a patch, that shows a part of an image with a very width. now, when scrolling the image from right to left with a counter, that is hardsynced to [gemhead], i still see some glitches, the scrolling is not stable in movement. wouldn't it be cool, to have an option for [gemwin], that automatically hardsyncs it to screen refresh rate? [gemwin -1] ? is it possible at all to get 'screen clock' (i don't know how this is called correctly) on every os?
roman
I think this is called vsync(and seen as an option on some systems as ''sync to vblank''). And afaik this is not just tied to the software that is rendering things to screen but to the graphics card driver itself. I'm very frustrated about this in linux and windows.
thank you for all that info. though, it seems, that this is not the answer, i was initially looking for, it addresses a few issues i had in the past (mplayer -vo gl has tearing, gem has tearing) and which your hint seems to be the solution to. i tried driconf (basically it's just a graphical tool, that simply creates a file called .drirc). i enabled 'sync to vblank', and it worked, though running your testpatch now eats the whole cpu. i tried mplayer -vo gl (-vo gl is the opengl video output driver of mplayer) and there it works without pegging the cpu. i tested also armagetron and it worked as well.
yo, i just found out, that when i first create the Gemwin and then start rendering after some seconds, it works without any problems. the cpu-peak seems to appear only, when the gemwin is created. rendering itself doesn't harm the cpu more, as it would do without 'sync to vblank' enabled. when switching workspace, while rendering is on, cpu is pegged again and x reacts only very slowly.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de