hi there,
is there a way to get the time (maybe via irq or callback or anythingelse)
when a surface was painted and vsync occured ?
(i have to sync an external hw with pictures shown on display)
joerg hanke
hi there,
is there a way to get the time (maybe via irq or callback or anythingelse)
when a surface was painted and vsync occured ?
(i have to sync an external hw with pictures shown on display)
joerg hanke
You wish… :-/ That would be a great feature for any sync jobs with
audio, video and other real time streaming stuff, but unfortunately,
very few APIs (and drivers) support it. I don’t know of any video
API that does, at least.
So, no there isn’t, and SDL can’t implement it, because (AFAIK) no
drivers can provide the necessary information.
All you can do is checking the current time each time the flip
operation finishes, unblocks or whatever it does on the target at
hand. Then apply suitable filtering and pray that the result is at
least within +/- 1 frame of reality.
Note that you can’t always timestamp the return of SDL_Flip() as flips
can be asynchronous on some targets. In such cases, you’ll have to
timestamp after locking the display surface, which is where the
application actually “hard syncs” to the video subsystem on such
targets.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
— http://olofson.net — http://www.reologica.se —On Sunday 08 June 2003 12.14, joerg hanke wrote:
hi there,
is there a way to get the time (maybe via irq or callback or
anythingelse) when a surface was painted and vsync occured ?
(i have to sync an external hw with pictures shown on display)
Hello, I hope it’s not a faq. [Embarassed]
Is vsync enabled by default or do I have to enable it ?
If I do, how ?
(I do not use OpenGL)
thank you MandarX------------------------
http://mandarx.xoom.it/index.php?lang=eng
Hello,
vsync is auto enabled since sdl 1.3
for sdl 1.2 you have to use
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
to activate it.
bye
Vittorio
Ted Turner http://www.brainyquote.com/quotes/authors/t/ted_turner.html -
"Sports is like a war without the killing."On Tue, Feb 16, 2010 at 10:48 AM, mandarx wrote:
Hello, I hope it’s not a faq. [image: Embarassed]
Is vsync enabled by default or do I have to enable it ?
If I do, how ?
(I do not use OpenGL)
thank you MandarX
http://mandarx.xoom.it/index.php?lang=eng
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Vittorio G. wrote:
Hello,
vsync is auto enabled since sdl 1.3
for sdl 1.2 you have to useSDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
to activate it.
bye
Vittorio
Thank you very much
MandarX------------------------
http://mandarx.xoom.it/index.php?lang=eng