SFML community forums

Help => General => Topic started by: SvenB on July 08, 2008, 05:09:50 pm

Title: SFML to control cognitive psychology experiments
Post by: SvenB on July 08, 2008, 05:09:50 pm
Hi,

we are currently looking for a new programming environment/libraries
to program experiments for cognitive psychology. Until today we are
working with DOS (full hardware control), but a transition to windows
is unavoidable ...

Okay, we need high precision timing, access to the parallel port
AND good control of the display/screen. I would like to ask especially
for the display issue some questions. Maybe someone can give
use the necessary information to opt for or against sfml.

We always need more than one graphics display, one visible, the
others virtual screens, sometimes called double buffering or page
flipping. All screens are fully prepared (rendered) before the presentation
starts to avoid any latencies due to time consuming graphics commands
or file access to load pictures or whatelse.

A typical instruction sequence looks like this (pseudo-code)

for ( trial=1; trial < maxtrials; trial++ ) {
   prepare_all_screens() ;
   show_screen_1_for_some_time();
   show_screen_2_for_some_time();
   show_screen_3();
   start_timer();
   wait_for_participant_response();
   stop_timer();
}

Is it possible to have multiple virtual screens with sfml,
rendering to invisible screens, switching beween screens,
switching synchronized with the vertical retrace?

Thanx in advance - Sven
Title: SFML to control cognitive psychology experiments
Post by: Laurent on July 08, 2008, 05:43:49 pm
Quote
Is it possible to have multiple virtual screens with sfml,
rendering to invisible screens, switching beween screens

Very soon, I already started working on it.

Quote
switching synchronized with the vertical retrace?

Yes.
Title: SFML to control cognitive psychology experiments
Post by: quasius on July 08, 2008, 06:33:07 pm
I'm not sure SFML interfaces to the parallel port...
(Although I'm sure you could add that with winAPI-specific stuff)
Title: SFML to control cognitive psychology experiments
Post by: SvenB on July 08, 2008, 08:13:32 pm
Quote
I'm not sure SFML interfaces to the parallel port...


We already have a hint to a solution for this problem,
independent from sfml.

By the way:
how precise is the sfml-timer?

Thanks in advance - Sven
Title: SFML to control cognitive psychology experiments
Post by: Laurent on July 09, 2008, 02:44:24 am
Quote
how precise is the sfml-timer?

The best it can be. The timer resolution depends on each OS.