Click here to Skip to main content
15,909,737 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GDI+ documentation Pin
Mark Salsbery18-Jun-07 7:47
Mark Salsbery18-Jun-07 7:47 
GeneralRe: GDI+ documentation Pin
Force Code18-Jun-07 8:16
Force Code18-Jun-07 8:16 
GeneralRe: GDI+ documentation Pin
Mark Salsbery18-Jun-07 8:34
Mark Salsbery18-Jun-07 8:34 
GeneralRe: GDI+ documentation Pin
Force Code18-Jun-07 10:08
Force Code18-Jun-07 10:08 
GeneralRe: GDI+ documentation Pin
Mark Salsbery18-Jun-07 11:04
Mark Salsbery18-Jun-07 11:04 
QuestionHandling input and graphics in a game engine Pin
Cyrilix18-Jun-07 7:33
Cyrilix18-Jun-07 7:33 
AnswerRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 8:10
Force Code18-Jun-07 8:10 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 8:29
Cyrilix18-Jun-07 8:29 
I was thinking of using a key array (of bools) and catching WM_KEYDOWN / WM_KEYUP to change the states of the keys from the input thread, then sending the states to the graphics thread. The input thread would have the WndProc function, whereas the graphics thread would simply check the local key array (in a while loop) to determine what happens.

Basically, it would look sort of like this:

WndProc (which runs in the input thread) catches WM_KEYDOWN where the key is VK_ESCAPE. The input thread sets key[VK_ESCAPE] = true. The graphics thread has a while loop that checks for VK_ESCAPE, and if true, it will return the thread (quit), if it sees another command such as the movement keys, then it will draw the next frame.
GeneralRe: Handling input and graphics in a game engine [modified] Pin
Force Code18-Jun-07 8:51
Force Code18-Jun-07 8:51 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 9:01
Cyrilix18-Jun-07 9:01 
GeneralRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 9:15
Force Code18-Jun-07 9:15 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 9:26
Cyrilix18-Jun-07 9:26 
GeneralRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 9:51
Force Code18-Jun-07 9:51 
GeneralRe: Handling input and graphics in a game engine [modified] Pin
Cyrilix18-Jun-07 10:01
Cyrilix18-Jun-07 10:01 
GeneralRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 10:33
Force Code18-Jun-07 10:33 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 10:43
Cyrilix18-Jun-07 10:43 
GeneralRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 10:48
Force Code18-Jun-07 10:48 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 11:18
Cyrilix18-Jun-07 11:18 
GeneralRe: Handling input and graphics in a game engine Pin
Force Code18-Jun-07 12:10
Force Code18-Jun-07 12:10 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 12:29
Cyrilix18-Jun-07 12:29 
GeneralRe: Handling input and graphics in a game engine Pin
Matthew Faithfull18-Jun-07 10:55
Matthew Faithfull18-Jun-07 10:55 
GeneralRe: Handling input and graphics in a game engine Pin
Cyrilix18-Jun-07 11:09
Cyrilix18-Jun-07 11:09 
GeneralRe: Handling input and graphics in a game engine Pin
Matthew Faithfull18-Jun-07 13:03
Matthew Faithfull18-Jun-07 13:03 
QuestionMultiple bitmap in VMR9 Pin
houari_id18-Jun-07 7:30
houari_id18-Jun-07 7:30 
AnswerRe: Multiple bitmap in VMR9 Pin
Mark Salsbery18-Jun-07 7:45
Mark Salsbery18-Jun-07 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.