Game Develop/DirectX
- 2016. 3. 7. 19:42
Direct Input(다이렉트 인풋)에 대한 정리
http://msdn.microsoft.com/ko-kr/library/windows/desktop/ee417816(v=vs.85).aspx
http://ppparkje.tistory.com/24
키보드, 마우스, 조이스틱에 대한 제어가 가능하다
다이렉트 인풋이 directx8버전에 맞춰진 거지만 워낙 잘 짜여있어서 11버전까지 업데이트되어도 이부분은 업뎃 안한다는 소리가 있음
다른 방식보다 반응속도가 빠름(이라고 했는데 아니다.... 자세한건 밑에 내용 참고)
Xbox360 패드의 경우에는 Xinput을 사용(샘플브라우저에 있으니 참고)
----------------------추가(중요)
위에는 잘 짜여서 업뎃 안한다는 소리가 있다고 했는데 뭐 다른것 찾다가 우연히 본 글인데
원문(http://www.gamedev.net/blog/233/entry-1567278-reasons-not-to-use-directinput-for-keyboard-input/) 의 일부분
DirectInput is a set of API calls that abstracts input devices on the system. Internally, DirectInput creates a second thread to read WM_INPUT data, and using the DirectInput APIs will add more overhead than simply reading WM_INPUT directly. DirectInput is only useful for reading data from DirectInput joysticks; however, if you only need to support the Xbox 360 controller for Windows, then use XInput instead. Overall, using DirectInput offers no advantages when reading data from mouse or keyboard devices, and the use of DirectInput in these scenarios is discouraged.
대충 요약하면 윈도우 메세지가 있기때문에 directInput은 조이스틱 입력 외에는 굳이 쓸 필요가 없고 조이스틱도 요즘 xbox패드를 많이 사용하기 때문에 xinput을 쓰면 된다는 내용이다. 따라서 다이렉트 인풋을 사용해서 좋을게 없다
아래 글에도 비슷한 내용이 있다
MSDN 에서 마우스 고감도 입력 받기(다이렉트 인풋과 윈도우 메세지(2가지) 비교)
(네이버 블로그 - 2014.08.28. 10:49)
'Game Develop > DirectX' 카테고리의 다른 글
비주얼 스튜디오에서 3D 에셋 변환(fbx to cmo) (0) | 2016.03.08 |
---|---|
sdkmesh 변환에 관하여 (0) | 2016.03.07 |
왼손, 오른손 좌표계 (0) | 2016.03.07 |
DirectX9 비트맵 폰트로 문자 출력 (0) | 2016.03.07 |
(링크)directx11 공부할만한 사이트 (2) | 2016.03.07 |