Re: [info-performer] Module for DirectInput

New Message Reply Date view Thread view Subject view Author view

From: Paolo Farinelli (paolo++at++sgi.com)
Date: 01/23/2003 15:05:30


Hi Park,

The viewer dispatches calls in the following order:

 o pfFrame
 o frame module callbacks
 o pfSync
 o sync module callbacks
 o pfFrame, .. and so on

So if you want minimum latency you should call
mDirectInput::UpdateInputState
from a sync callback.

Paolo

> Hi ciao, Paolo
>
> Thank very much for your correction. I agree with you.
>
> BTW, Can I ask you some questions ?
>
> If mDirectInput::UpdateInputState would be in a frame or sync
> callback, when is this invoked before of after pfFrame() ?
> I want to make this just before pfFrame in order to ues least recent
> value from input device.
>
>
> ====
> Park
>
>
>
>
>> From: Paolo Farinelli <paolo++at++sgi.com>
>> To: ChnagHoon Park <littlepine72++at++hotmail.com>
>> CC: info-performer++at++sgi.com
>> Subject: Re: [info-performer] Module for DirectInput
>> Date: Thu, 16 Jan 2003 19:19:55 -0800
>>
>> Hello ChnagHoon,
>>
>> thank you very much for sending your sample pfvModule to the list.
>> We encourage other pf-users to do the same, and will try to collect
>> all contributions and make them available through the oss.sgi.com site.
>>
>> I have not been able to compile/test your module, but I will do so in
>> the
>> near future..
>>
>> Just one note on your implementation: I noticed that your module uses a
>> preDraw callback to carry out its per-frame processing (reading joystick
>> input and printing it out).
>> The preDraw callback is not the best place to be doing this, since it is
>> called once before drawing each channel, and may thus be called multiple
>> times per frame.
>> Also, in a multiprocess configuration, the preDraw callback is called in
>> DRAW processes, which is not where you'd expect to be reading joystick
>> data [although this is not really an issue on win32 for the time
>> being as
>> multiprocess configurations are not yet supported].
>> The best spot for calling mDirectInput::UpdateInputState would be in a
>> frame or sync callback.
>>
>> Thanks again!
>> ciao,
>> Paolo
>>
>>
>>
>>
>>
>>
>> ChnagHoon Park wrote:
>>
>>> Hi pfAll
>>>
>>> This is a simple program to control Input devices such as Joystick,
>>> GamePad supported by DirectInput. This module is based on libpfv and
>>> DirectInput.
>>> Of course, this only runs on Windows.
>>>
>>> BTW, is there a site for the shareing of Performer code?
>>>
>>>
>>> # Makefile for the linkage of DirectInput
>>> ¡¦
>>> EXTRACFLAGS=-I. -Ic:/win32app/mssdk/include
>>> EXTRALIBS=libpfui.lib libpfdu-util.lib ibpfv.lib
>>> /LIBPATH:"c:\win32app\mssdk\lib" dxguid.lib dinput8.lib
>>> ¡¦
>>>
>>> Download site (Anonymous Login)
>>> ftp://210.95.48.144=20
>>> Location: /pub/joypfv
>>>
>>> ===========================
>>> Park
>>>
>>>
>>> _________________________________________________________________
>>> Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
>>> http://join.msn.com/?page=features/junkmail
>>>
>>> -----------------------------------------------------------------------
>>> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
>>> Open Development Project: http://oss.sgi.com/projects/performer/
>>> Submissions: info-performer++at++sgi.com
>>> Admin. requests: info-performer-request++at++sgi.com
>>> -----------------------------------------------------------------------
>>>
>>>
>>
>>
>> --
>> Paolo Farinelli paolo++at++sgi.com
>> Member of Technical Staff, OpenGL Performer 1-650-933-1808
>> Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
>
>
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>

-- 
Paolo Farinelli                                           paolo++at++sgi.com
Member of Technical Staff, OpenGL Performer              1-650-933-1808
Silicon Graphics        1600 Amphitheatre Pkwy, Mountain View, CA 94043


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 15:05:39 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.