Re: [Plib-devel] proper plib coding example
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2005-02-26 20:08:20
|
br...@sa... wrote: >>I think that what most 3D applications truly need is to have the >>user's choice of screen size be used by the application to set only >>the WIDTH of the screen - and as he drags the window around, to >>force the window dimensions such that the pixels remain square *and* >>the horizontal and vertical fields of view are maintained. > > > I think this is impossible, you could only maintain minimal fov vals, > you cannot fix them and keep aspect ratio the same while user drags. > (unless you disable non-linear window scaling). You misunderstand. Suppose the window is initially 3:4 aspect ratio and the FOV set up such as to make the pixels square. If the user then manually resizes the window to (say) 1024x512 then the resize callback would ignore the vertical dimension and calculate a new vertical size of 1024*3/4 = 768, then it would resize the window (under program control) to 1024x768. Thus, the user can resize the window but not alter the aspect ratio. This ensures that overlaid symbols don't become illegible and that the user cannot change the field of view and thereby mess up careful camera positioning. (Just try doing it the other way with an application that does split-screen stuff!) ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |