Mouse/Drawing problem
I have a small w32 opengl engine and after doing everything I need I tested it and something strange happenned, I was abble to move my primitive (some quads/triangle) with the mouse on axis X and Z even if I didn''t had any code for it. Well I have in the message events the code to look on WM_MOUSEMOVE and WM_KEYDOWN (I think I didn''t made any mistake here). The MOUSEMOVE was just to stock position of the mouse into variables and KEYDOWN/KEYUP were to change color of my primitive.. so I asked on IRC and someone told me to put break; at the end of the WM_MOUSEMOVE select case because it would interfer with WM_KEYDOWN... even if I don''t understand and I hate to do things when I don''t understand, I tested and now.. humm well the problem have something to do with that because now it don''t draw anything anymore...
But you can''t really help if you don''t have any idea of the code so tell me your e-mail if you wanna help, I will send it.. thx!
When you use switch statements, you must include "break;" at the end of each case. The reason for this is that once the program finds the correct case, it will execute the code from that point on until it reaches a break statement or the end of a code block.
After my exam I said, "GG Professor".
|
After my exam I said, "GG Professor".
After my exam I said, "GG Professor".
Yeah I know that but I don''t understand why it make my drawings move on axis X and Z when I move the mouse and why nothing appear anymore... ohh and.. I do return 0; then break;.. is it ok?
I'll post some code
The Racer.Init create a window with opengl on it and set all for it to look good
This only check messages
and them Racer.Menu (another .cpp)
and CheckMenuKeys :
Humm it's a bit long, hope you will understand.. when I write // ...something... it's because I removed code because it wasn't needed to understand
Edited by - Dunge on January 25, 2002 6:59:46 PM
|
The Racer.Init create a window with opengl on it and set all for it to look good
|
This only check messages
|
and them Racer.Menu (another .cpp)
|
and CheckMenuKeys :
|
Humm it's a bit long, hope you will understand.. when I write // ...something... it's because I removed code because it wasn't needed to understand
Edited by - Dunge on January 25, 2002 6:59:46 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement