Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / GDK User-Input

Author
Message
Jumpster
16
Years of Service
User Offline
Joined: 7th Feb 2008
Location:
Posted: 8th Oct 2008 03:10
I've been looking through the Header files and it appears as though user input (Keyboard, mouse) is handled via the Window's Messaging system. Is this correct or is DInput going behind the scenes? If DInput, how do I get to the device myself?

Regards,
Jumpster
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 8th Oct 2008 04:12
Well, in the the input header there's a function:



so I don't think it uses window's messaging system. Could be wrong though. And if I'm right then I'm not sure how to get the pointer to the input device.

Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 8th Oct 2008 04:22
Personally, ive not looked at how the messages are handled in GDK whether they use win32 or DXInput.. although you can use Win32 API calls from within DarkGDK, and grab/process windows messages etc yourself(with PeekMessage() etc).. have a look in globstruct.h .. its in the DarkGDK header file directory and contains a bunch of DarkGDK internal variables..

Ive not actually tried processing any windows messages myself, but i know its possible to use the ptr g_pGlob to get a Device Context for the app window and draw to the device directly through the GDI as ive done that myself ( im not sure how GDK handles the surfaces .. i just grabbed the DC, passed it to the GDI methods to create pens/brushes etc and select them and it worked, released the DC when i was done... I had no trouble drawing to DarkGDK bitmaps with the win32 GDI and displaying the results on a DarkGDK 3D object as a texture - didnt even have to play with the buffers..although it WAS sloooow )

If it ain't broke.... DONT FIX IT !!!
Jumpster
16
Years of Service
User Offline
Joined: 7th Feb 2008
Location:
Posted: 8th Oct 2008 05:22
Quote: "Well, in the the input header there's a function:

+ Code Snippet
void RefreshD3DInput ( int iMode );"


I don't recall seeing this in my headers. Which file was it in?

Regards,
Jumpster
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 8th Oct 2008 13:02
Quote: "I don't recall seeing this in my headers. Which file was it in? "


DarkSDKInput.h.

Login to post a reply

Server time is: 2024-09-30 07:20:48
Your offset time is: 2024-09-30 07:20:48