From: Hanno F. <han...@gm...> - 2007-01-10 14:04:45
|
Hi Sven, thanks for your idea, and of course the current behaviour should stay as is. Some state like "GLUT_SHARE_DISPLAY_LISTS" would be great! This is much more than "acceptable", it is exactly that, what I thought about. Just some kind of build-in switch, not to have to hack the code. I was afraid I would have to do the work of creating a switch to modify the behavior - with still no knowlege of GLX and GCs. Didn't you add this nice glutLeaveMainLoop-extension too in 2002? Under HP-UX I still have to realize this with ugly longjumps. Clear skies Hanno > From sve...@ae... Wed Jan 10 14:02:17 MEZ 2007 > To: fre...@li... > Cc: steve <sjb...@ai...>, Hanno Falk <han...@gm...>, > fa...@fs... > Am Mittwoch, 10. Januar 2007 07:02 schrieb steve: > > [...] > > So - what you need to do is to declare a global GLXcontext which > > is initially NULL. Every time you call glXCreateContext, pass that > > value as the third parameter - and update the global with the value > > new context handle. > > > > We don't want to do this in the released copy of freeglut though > > because we need compatibility with GLUT - but this is OpenSourced > > code - so you can easily make your own version. > > We already have a tiny extension in freeglut, namely the > GLUT_RENDERING_CONTEXT state, which can currently have one of two values: > GLUT_CREATE_NEW_CONTEXT (default, no sharing at all) or > GLUT_USE_CURRENT_CONTEXT (the whole OpenGL state machine is shared). What is > actually required to make the behaviour under GLX and WGL consistent is > something in the middle (GLUT_SHARE_RESOURCES?), which can do what Steve > describes above. Although we will probably keep the current behaviour as it > is (although inconsistent across platforms), a user can have the choice > without having to hack the sources. Would that be acceptable? > > Cheers, > S. -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |
From: Sven P. <sve...@ae...> - 2007-01-10 14:15:24
|
Am Mittwoch, 10. Januar 2007 14:49 schrieb FSG DV Johannes Falk: > [...] > Some state like "GLUT_SHARE_DISPLAY_LISTS" would be great! I think that this would be a misnomer. If I understand the current state of= =20 affairs correctly, not only display lists, but texture objects and buffer=20 objects are shared between contexts then, too. IIRC the corresponding MSDN= =20 documentation is wrong in this respect and all those resources are shared o= n=20 Windows, too. > [...] Didn't you add this nice glutLeaveMainLoop-extension too in 2002? > Under HP-UX I still have to realize this with ugly longjumps. Nope, this wasn't me... (at least I can't remember it ;-) Cheers, =A0 =A0S. |
From: Johannes F. <han...@gm...> - 2007-01-10 21:04:27
|
Hi Sven, I just detected that this was discussed by John Fay and Micah Richert last week too! They talk about a possible "GLUT_USE_SHAREDLISTS" and the OS inconsistency in GLUT_USE_CURRENT_CONTEXT, please see: http://www.nabble.com/UseCurrentContext-t2911474.html or http://www.nabble.com/UseCurrentContext-tf2911474.html#a8160421 and http://www.nabble.com/user/UserProfile.jtp?user=277507 > Am Mittwoch, 10. Januar 2007 14:49 schrieb FSG DV Johannes Falk: > >> [...] >> Some state like "GLUT_SHARE_DISPLAY_LISTS" would be great! >> > > I think that this would be a misnomer. If I understand the current state of > affairs correctly, not only display lists, but texture objects and buffer > objects are shared between contexts then, too. IIRC the corresponding MSDN > documentation is wrong in this respect and all those resources are shared on > Windows, too. > |
From: Johannes F. <han...@gm...> - 2007-01-21 13:56:55
|
Dear Sven, this sounds promising, from http://www.rush3d.com/reference/opengl-bluebook-1.0/ch07.html#id5563888: *glXCreateContext* creates a GLX rendering context and returns its handle. If /shareList/ is not *NULL*, then all display-list indexes and definitions are shared by context /shareList/ and by the newly created context. An arbitrary number of contexts can share a single display-list space. However, all rendering contexts that share a single display-list space must themselves exist in the same address space. But I see an other rising problem: What happens, if me (the programmer) or the user closes all windows simultaneously? I want to keep the shared lists until a new window is opened. But I am afraid that the context may get freed by some cleanup routine and the shared lists get lost. Do we have to do any special precautions for that special case, or am I wrong? Clear skies Hanno |
From: steve <sjb...@ai...> - 2007-01-21 16:03:19
|
Johannes Falk wrote: > What happens, if me (the programmer) or the user closes all windows > simultaneously? > I want to keep the shared lists until a new window is opened. > But I am afraid that the context may get freed by some cleanup routine > and the shared lists get lost. > Do we have to do any special precautions for that special case, or am I > wrong? When the last rendering context is closed, all of the display lists, textures, shaders and so forth are deleted. There is nothing you can do to stop that. What you have to do is to keep at least one rendering context open at all times. The best way to do that is to use some sort of off-screen rendering context - but freeglut doesn't support that kind of thing. If you need to do this using GLUT/freeglut then you have to have a teeny-tiny window open someplace to keep this information for you no matter what. Please remember that GLUT/freeglut are intended for small, simple applications - principally for demonstrations. GLUT was never intended to be an industrial-strength windowing library for sophisticated high-end applications. |
From: Johannes F. <han...@gm...> - 2007-01-23 20:07:06
|
New news of the HP Labs about their GLUT Source: ------------------------ The source that we use to build the libglut included in the HP-UX OpenGL libraries is a rather old version (circa 1996) of the original glut toolkit developed be Mark Kilgard (then of SGI). This was revision 3.0 of the toolkit. The most recent release of the glut toolkit is 3.7 (from August of 1998) and can be found at: http://www.opengl.org/resources/libraries/glut/ I recommend that the customer start with the glut 3.7 source and modify it to add support for display list sharing. The free glut library (http://freeglut.sourceforge.net/) the customer referred to is a variant of the glut toolkit that was created as a fresh start in an attempt to advance the interface since the original glut was considered done by it's developer and was no longer been actively developed. Hopefully this answer will meet with the customer's needs. Since glut is an open source toolkit, we've included it in our HP-UX OpenGL releases, but HP is not in a position to further develop this toolkit ourselves. ------------------------ Mit freundlichem Gruß / Best Regards Mario Veygel HP EMEA Competency Center UNIX |