Quote:
By the way, would you happen to know how fast GetKeyState() runs? After all, it would have to be called a LOT of times, and I'm kind of worried about performance right now...
Yes it by passes the message loop, therefore I can guarantee it's faster than NeHe's way of checking for keys because NeHe's way always has to go through the windows procedure, and the windows procedure is usually too slow (hence directx, everything is low latency because everything happens instantly, or the events are processed directly instead of waiting on the windows procedure). But anyway like I was saying I'm pretty sure GetKeyState is fast enough for your purposes, using direct input may be more ideal for keyboard/mousemovement but again windows includes functions that allow you to check these things instantly (i.e GetCursorPos for determining in screen coordinates where the mouse pointer is position). You should check out the camera class from gametutorials.com (the completed camera class should be in all tutorials passed tutorial number 5 or 6).