Agree 1000%.

I write cross platform code every day. Nothing good comes from giving into the "I just want to do X on Y platform" request.

Larry E. Ramey

----- Original Message ----
From: Steve Baker <steve@sjbaker.org>
To: John Tsiombikas <nuclear@member.fsf.org>; FreeGLUT developers list <freeglut-developer@lists.sourceforge.net>
Sent: Monday, March 17, 2008 4:02:48 PM
Subject: Re: [Freeglut-developer] X11 connection socket

The trouble with providing system-specific stuff like that in a portable
library is that people will use it - and end up with non-portable
applications - which is PRECISELY the thing we're trying to stop them
from doing by providing the library in the first place!

We should be asking ourselves why they need this piece of information -
and dealing with whatever issue underlies that need.

John Tsiombikas wrote:
> On Mon, Mar 17, 2008 at 04:21:14PM +0100, Jocelyn Fr??chot wrote:

>> John Tsiombikas wrote:
>>
>>   
>>> I want to be able to get the X11 connection socket so that I can select
>>> to that and other file descriptors in my main loop. Is there such a
>>> function to give me that in freeglut?
>>>     
>> I don't think so.  Note that there is already a ???Connection??? field in
>> the ???fgDisplay??? structure, which is set in ???freeglut_init.c???.  However,
>> I can't find any single place where this field is actually used...
>>
>> Anyway, is it possible to get a similar file descriptor from other
>> systems or does it only make sense for X11?  In short, can this feature
>> be included in a multi-platform library?
>>   
>
> Not as such, the X window system is the only one where there is an
> explicit "connection" between applications and a windowing server AFAIK.
> However, it would make sense to provide a cross-platform function that
> returns window-system specific information. Something like:
> void *glutWinSysInfo();
>
> And that would return a pointer to a window-system-specific struct
> containing any information that makes sense on each window system. For
> instance on X11 it could contain the Display*, the GLX context, and the
> window identifier. On win32 it could contain the window HANDLE, or
> whatever (I can't remember what's needed on win32). Anyway you get the
> point.
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freeglut-developer


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com