2009/9/1 devon <[email protected]>: > > I was getting very frustrated developing a 16:9 fullscreen game on a > 1024X768 screen (yeah, I know that's a silly idea :) ) because > fullscreen and resizing the window would clip off the edges of my game > instead of putting black bars on the top and bottom. So I made some > changes to director.set_projection so it can keep the aspect ratio > correctly without clipping (it now sets black bars on the top and > bottom as well as the side depending on if the aspect ratio of the > window). I think this is more correct than clipping off the sides when > you resize a widescreen window to non widescreen proportions. > > I also added a check so there is no longer a division by zero if you > accidentally resize the window to zero. > > The diff linked fixes those problems, but I don't know the rationale > for working the way it was in svn so please someone look at these > changes and let me know (I have no idea if I have now messed up the > gluPerspective and gluLookat stuff for doing effects?, I have only > just begun learning opengl and don't know the purpose of those calls > in set_projection). > > http://groups.google.com/group/cocos-discuss/web/director.diff
I know I am digging up a old thread but the patch proposed (or something similar) has still not be applied. The basic problem is that if you create an initial window with an aspect ratio of says 4:3 and the user has a 16:10 screen, all is well is windowed mode. But as soon as you switch to fullscreen then the drawing no longer has the proper aspect ratio and the mouse displacement is no longer properly mapped to what is on screen. [director_projection.patch] is an updated patch (against current trunk) for the display area problem. [director_displacement.patch] is a patch to add a get_virtual_displacement() method that does similar work than get_virtual_coordinates() but for mouse movements. Arnaud -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
director_projection.patch
Description: Binary data
director_displacement.patch
Description: Binary data
