Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Tutorial: an XBOX360 pad Class using GLFW

  • This topic is locked This topic is locked
7 replies to this topic

#1 Lil_Lloyd   Members   -  Reputation: 287

Like
0Likes
Like

Posted 06 February 2013 - 08:05 AM

Hi

 

I always wanted to get some form of feedback on the only tutorial I've ever written! It's for people who want to use Xbox 360 pads with GLFW (open GL for Windows framework).

 

Please enjoy

 

http://www.lloydcrawley.com/reading-input-from-an-xbox-360-pad-using-glfw-pt-1/



Sponsor:

#2 Helixirr   Members   -  Reputation: 141

Like
0Likes
Like

Posted 07 February 2013 - 03:40 AM

I haven't tried to implement this since I'm using XInput myself, but from I see, I like it. smile.png  Never thought of using GLFW like this! cool.png



#3 Polarist   Members   -  Reputation: 160

Like
0Likes
Like

Posted 08 February 2013 - 03:16 PM

In your article you mention that you'll discuss it another time, but I'm really curious how you separate the triggers without XInput?

 

As I understood it, robust trigger support is one of the main reason to use XInput.

 

(For those that don't know: The XBox360 controller L and R triggers share the same Axis, L moving the axis to -100% with R moving to +100%.  If you press both at the same time, the two will cancel each other out, and the axis will go back to 0%, which appears like they are both not pressed.  XInput separates these two for you, but does it behind the scenes.)


Edited by Polarist, 08 February 2013 - 03:18 PM.


#4 Lil_Lloyd   Members   -  Reputation: 287

Like
0Likes
Like

Posted 08 February 2013 - 04:27 PM

In your article you mention that you'll discuss it another time, but I'm really curious how you separate the triggers without XInput?

 

When I wrote the article (last summer) I was unaware that the left and right triggers thing was related to the drivers used by the o/s whilst apparently xInput uses some different drivers to most to read the input from the pad. 

 

However you can install a driver from here that helps: 

http://www.jonnys-place.com/index.php?topic=10495.0

 

The negative being every user of your game will need the driver. Unless I become a driver programmer and use such arcane wizardry instead of GLFW.



#5 Polarist   Members   -  Reputation: 160

Like
0Likes
Like

Posted 09 February 2013 - 01:42 AM

Is there any advantage to doing it this way over XInput?

 

My current solution uses XInput, but thanks for the link to those drivers.  I'll keep it bookmarked in case there's a need for it down the road.



#6 Lil_Lloyd   Members   -  Reputation: 287

Like
0Likes
Like

Posted 10 February 2013 - 04:06 AM

Well I can't remember clearly but last summer I tried using Xinput with GLFW and thought it was a pain, and found GLFW by itself easier to manage as long as I didn't want to use the shoulder triggers



#7 SHC   Members   -  Reputation: 135

Like
0Likes
Like

Posted 17 January 2015 - 03:19 AM

Hello friends,

 

The site you have linked to is down. Was it moved to a new location or what?


Harsha...ch


#8 jbadams   Senior Staff   -  Reputation: 21161

Like
0Likes
Like

Posted 17 January 2015 - 05:58 AM

I'm afraid this topic is two years old, and it appears the linked tutorial simply isn't available anywhere any more.  The original poster also hasn't been active since 2013.

 

I'm closing this since it's so old and no longer relevant given the broken link.







PARTNERS