Hello
Is there any tutorial for adding multitouch input in SDL 1.3? I cannot find
any. I’m aware that SDL 1.3 in still in developpement. Is the only solution
to look the source file?
Thank you very much
Victor–
View this message in context: http://old.nabble.com/multitouch-tutorial-in-SDL-1.3-tp31234299p31234299.html
Sent from the SDL mailing list archive at Nabble.com.
You can find some insight here:
http://svn.icculus.org/twilight/trunk/darkplaces/vid_sdl.c?view=markup
In particular look at the SDL_FINGERDOWN and related events, note the coords are 0-32767 across the touch surface in each direction (so the pixel aspect as it were, is not square), think of them as a
fixed point fraction from 0-1.
You can also find a function called VID_TouchScreenArea where I categorize whether any fingers are within a rectancle on the screen, and return relative motion (virtual joystick) coordinates if so, as
well as a button status (whether any fingers are in this).
It’s a bit hacked together but you might find some clues there.
Note you also receive SDL_MOUSEBUTTONDOWN/SDL_MOUSEBUTTONUP/SDL_MOUSEMOTION events for the first finger, but not any additional fingers, it is best to ignore these if you are targeting a touch-only
device.On 03/24/2011 05:48 PM, victor-victor wrote:
Hello
Is there any tutorial for adding multitouch input in SDL 1.3? I cannot find
any. I’m aware that SDL 1.3 in still in developpement. Is the only solution
to look the source file?
Thank you very much
Victor
–
LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier
Hello and thank you for your answer
You can find some insight here:
http://svn.icculus.org/twilight/trunk/darkplaces/vid_sdl.c?view=markup
However this seems a bit complicated since I see a source file; my question was to find a tutorial on this topic since I’m a bit familiar with libsdl but not at all with multitouch…
Hello
Is there any tutorial for adding multitouch input in SDL 1.3? I cannot find
any. I’m aware that SDL 1.3 in still in developpement. Is the only solution
to look the source file?
Thank you very much
Victor
Victor> On 03/24/2011 05:48 PM, victor-victor wrote:
You can also look at the testgesture example:
http://hg.libsdl.org/SDL/file/default/test/testgesture.cOn Thu, Mar 24, 2011 at 6:54 PM, Forest Hale wrote:
You can find some insight here:
http://svn.icculus.org/twilight/trunk/darkplaces/vid_sdl.c?view=markup
In particular look at the SDL_FINGERDOWN and related events, note the
coords are 0-32767 across the touch surface in each direction (so the pixel
aspect as it were, is not square), think of them as a fixed point fraction
from 0-1.
You can also find a function called VID_TouchScreenArea where I categorize
whether any fingers are within a rectancle on the screen, and return
relative motion (virtual joystick) coordinates if so, as well as a button
status (whether any fingers are in this).
It’s a bit hacked together but you might find some clues there.
Note you also receive SDL_MOUSEBUTTONDOWN/SDL_MOUSEBUTTONUP/SDL_MOUSEMOTION
events for the first finger, but not any additional fingers, it is best to
ignore these if you are targeting a touch-only device.
On 03/24/2011 05:48 PM, victor-victor wrote:
Hello
Is there any tutorial for adding multitouch input in SDL 1.3? I cannot
find
any. I’m aware that SDL 1.3 in still in developpement. Is the only
solution
to look the source file?
Thank you very much
Victor
–
LordHavoc
Author of DarkPlaces Quake1 engine -
http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged
demo." - James Klass
"A game is a series of interesting choices." - Sid Meier
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and CEO, Galaxy Gameworks