I am new to graphics programming and looking for a library for
programming visual perception
experiments, and SDL looks promising. However, for my experiments visual
stimuli will have to be presented for very short times (in the range of
some milliseconds). As far as I see, one limitation of presentation
duration is the refreshing frequency of the screen, i. e. the duration
of one frame.
That is correct. Depending on the monitor and the video cards ability to
drive it, you will always have display times measured in several
milliseconds. For example, 60fps = 16.67 milliseconds/frame and 120fps=
8.33 milliseconds/frame. If you can’t live with those speeds you will
need to look for special equipment.
Provided that I know this frequency, will it be possible
then to display a visual stimulus for an exact number of such frames
with SDL? I didn’t find such a function in the documentation.
Nope, SDL does not provide such a function. It is not, in general,
possible to provide such a function because it requires that the video
card synchronize with what is called the “vsync” signal. And, most
people have that turned off so they get higher measured frame rates.
Do you think SDL is a suitable tool for this purpose? And have you maybe
any suggestions how to do this?
You need to go with the native graphics functions for the platform you
are using. For example, on Linux/UNIX you can use the xgl functions +
OpenGL + careful configuration of the video card to get what you are
asking for. For MSWindows substitute wgl or go with DirectX.
You have very special needs, it is unlikely that you will be able to
find a general purpose tool that fulfills your needs.
Bob PendletonOn Tue, 2004-11-16 at 08:39, Tobias Elze wrote:
Thanks a lot,
SDL mailing list
SDL at libsdl.org