View Full Version : window problem
12-13-2002, 04:24 AM
when ever we move the mouse onto the cross button and move back onto the window the sceen is again drawn. if any change of shape or orientation is there they too change
though we dont really close the window or that particular event has occured. why is this happening?
12-13-2002, 07:47 AM
Your scene is redrawing itself for some reason. do you do a redraw in your mouse function by any chance?
12-15-2002, 09:17 PM
Every time you resize your window you need to resize your view port and reset your model and project matrices along with the perspective. Here is the code to do it. Put this under the windows WM_SIZE procedure. The width and height can be obtained by taking the LOWORD(lparam) and HIWORD (lparam) respectively. Cast them into ints and store then into variables width and height. Anyways...here is the code:
//Load projection matrix
//Clear projection matrix
//Reset perspective (from 0.1f to 100.0f)
//Load Modelview Matrix
//Clear Modelview matrix
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.