While using fullscreen mode, I can avoid shearing using SDL_HWSURFACE and 
SDL_DOUBLEBUF, which appears to induce SDL to sync with vertical retrace.  
Unfortunately, these flags don't seem to be supported for windowed mode.

Reading through the mailing list archives on www.libsdl.org, it appears that SDL only 
syncs with the retrace if it is supported in the underlying drivers / subsystems.  
This appears to be an issue several people have, both on Win32 and Linux, but that 
can't really be resolved in a platform independent way, according to some of the 
posters there.

However, one poster mentioned that, by specifying certain "targets," specifically 
DirectX or certain X Windows extensions, the problem might be resolved.  What I'm 
wondering is whether this can be done using SDL_perl?  The poster did not give any 
example code, and I'm not a member of that list, so I couldn't ask for clarification.  
Thus, I'm not even entirely sure how one would do it using SDL in any language, or 
even if it would require recompiling SDL.

If it would require recompiling SDL, can anyone tell me if it would work for me to 
replace the .dll's that came with the precompiled Win32 SDL_perl .ppd, without 
requiring me to recompile SDL_perl?  Would it perhaps depend on the version of SDL the 
SDL_perl was compiled against, versus the version I compile?

Or, can anyone else recommend a way to avoid shearing in windowed mode?  I would be 
acceptable to be Win32 specific, as I could just put a check against $^O and simply 
fall back to the default (shearing) if the work-around was unavailable.  Perhaps a 
Win32 system call that would block until the retrace?

Thanks,
Cory Johns

Reply via email to