Re: [Freeglut-developer] I'm back ...

Fay John F Contr AAC/WMG wrote:
> Gentlemen,
>
> I'm back ... although I'm on my way home. I'll be back on Monday.
>
> It seems that the fat hit the fire the day I left and has been
> burning ever since. Has there been an upshot on any of the issues?
There was a VERY (some would say 'overly') complete discussion (some would
say 'flame war') about the issue of whether off-screen rendering areas should
be made to look like regular windows - or whether they should have their own
(very simple) API that would not allow them to have things like Menu's, callbacks,
resizing, etc.
It was clear that this debate would never be resolved by mere debate...so (as
owner of freeglut) I eventually called it to an end and decreed that off-screen
rendering areas should NOT be made to look like they are regular windows.
The thing that finally convinced me is that if we treat them as 'regular' windows
then operations on these windows would have to participate in freeglut's normal
event scheduling. In that case, there would be no way to ensure that an off-screen
window would get it's Redraw event before the 'real' window that uses it's results
gets its' own redraw. This would be utterly disasterous in many applications - so
I conclude that making off-screen buffers be anything other than very simple things
would be foolish.
So - I would like to see:
handle = glutCreateBuffer ( ...height, width, etc... ) ;
glutSetBuffer ( handle ) ;
glutDestroyBuffer ( handle ) ;
...and pretty much nothing else. I've asked Richard to back out his changes
that make buffers look like windows.
Consider the case where I'm rendering a scene of a room. In the room there is
a mirror - and for some reason, the application wishes to implement mirrors by
rendering the scene into an off-screen buffer from a point of view behind the
mirror.
Inside the redraw event of the main window, I detect that the mirror has
appeared inside the field of view. At this point, I need to create the
off-screen buffer and render into it - then copy the contents of that buffer
into a texture map and using that in the main window to texture the mirror
polygon.
All of those buffer operations had to happen within the redraw event. If
these buffers were treated as real windows are then freeglut would be unable
to guarantee to create the buffer immediately (because it can't create real
windows immediately because - for example - Xwindows can't do that). What's
more, we don't want 'redraw' callbacks for the buffer because we need to render
to it **NOW** and not at some indefinite time in the future.
The debate gets more complex than this - but that's the gist of my reasoning.
However, the decision is made - and I don't want another long debate about it.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@...> WorkEmail: <sjbaker@...>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.nethttp://tuxaqfh.sf.nethttp://tuxkart.sf.nethttp://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-----