Re: [Plib-devel] proper plib coding example
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2005-02-26 16:06:56
|
Bram Stolk wrote: > Hi there, > > > I found out, that nowhere in plib examples, we show people how to properly > write a plib application. > > The main problem is that none of the demos properly handles resizing of the > window. After a resize, the aspect ratio is likely to change. This causes > distorted geometry in the rendering (Spheres look like elipses). > > Also, I understand that the current recommended way to implement a plib > app, > is to use ssgContext. However, none of the demos does this. > > tuxkart, tux-aqfh and flightgear have the same problems.... so where to > turn > to for a recommended plib app implementation? > > Well, I've modified examples/src/ssg/viewer so that at least 1 app is > available > that uses ssgContext, and properly handles window resizes. Maybe it > makes sense > to fix all plib examples? Yeah - but there can be problems with some applications. Very often, I'll position the camera very carefully so that you aren't intersecting adjacent walls, etc. If you allow the user to (in effect) alter the field of view - then other things may go wrong. In particular, it's possible that on-screen iconography will disappear off the top or bottom of the screen. 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. ---------------------------- 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----- |