Hi, On Tue, 2009-11-10 at 14:47 -0600, Carsten Neumann wrote: > Hello Pablo, > > Pablo Carneiro Elias wrote: > > well, we're having more troubles now due to the indirect use of > > <X11/X.h> by the PassiveWindow under linux. The problem is X.h creates > > hundreds of global compile definitions that causes a lot of conflicts > > (since its a compile definition, namespaces don't help). We use > > precompiled headers, and thats why OSG includes affects all code. We > > think that PassiveWindow shouldn't include nor use NativeWindow because, > > as far as we can tell, it really does nothing but to delegate rendering > > context to a local system (eg. we use a Qt Window with an OpenGL canvas).
but the underlying window (potentially) does more. With the new memory models of OpenGL the old times where this worked nicely are over. > > X.h might be a particular source of difficulties since it creates many > > global definitions, it seems better not to use it without the real need > > to do it. > > Is that change really possible or we're missing something? it uses forward declarations for now so you should be save. > from what I can piece together by looking through the code, I suspect it > is not that straightforward: the PassiveWindow essentially captures the > active OpenGL context at init() time and stores it internally. almost all derived windows do that. > This allows it to enable/disable the context as needed (AFAIK this is > required for the parallel drawer). that comes from OpenGL. > One solution I could imagine, is to rename the PassiveWindow as it > currently exists into ExternalContextWindow (i.e. it is a window that > does not create a context of its own, but still has control over it) and > reintroduce a fully PassiveWindow that leaves all context handling to > the user, but probably can not be made to work with the parallel drawer. hmm, my minimum rule for any window would be, once you call render() (plus maybe one or the other window functions) all OpenGL belongs to OpenSG for as long as we have not returned yet. I'll try to be nice and hand the context back afterwards ;). And you might pay a performance price for it. ExternalContextWindow might be a good compromise. The other not sure, I would not keep calling it passive window as there might be some restrictions or performance penalties. So the name should make this clear. kind regards, gerrit ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
