I am trying to use wglShareLists of Windows OpenGL implementation in order
to make display lists of fonts available to the rendering contexts of both
my main View and a separate Thread for scene animation.
This does not work, although sharing across threads (as opposed to
processes) is allowed.
Any ideas, experiences or code fragments?
Thanx,
Daniel
"You can only share display lists with rendering contexts within the same
process. However, not all rendering contexts in a process can share display
lists. Rendering contexts can share display lists only if they use the same
implementation of OpenGL functions. All client rendering contexts of a given
pixel format can always share display lists."
This makes sense since each process has it's own 4Gig address space. I've
successfully used wglShareLists with display lists and texture objects in
the same process, but never with different ones.
Ron
"Dr. Daniel Düring" <NOSPAM...@meteo-graphics.de> wrote in message
news:8m9942$h9i$1...@unlisys.unlisys.net...
Thank you very much,
Daniel
Ron Fosner <r...@lifefx.com> schrieb in im Newsbeitrag:
3989a017$0$23...@wodc7nh6.news.uu.net...
> I am trying to use wglShareLists for two threads within the same process.
Do you mean you are trying to have two threads, each with their own OpenGL
context, sharing the display lists and texture objects? Remember to call
wglMakeCurrent() in each thread, specifying the context that belongs to
that thread.
Tell us more precisely what you are doing, and what errors you are getting.
--
Andy V (OpenGL Alpha Geek)
"In order to make progress, one must leave the door to the unknown ajar."
Richard P. Feynman, quoted by Jagdish Mehra in _The Beat of a Different Drum_.
Paul Martz's OpenGL FAQ: http://www.opengl.org/About/FAQ/Technical.html
>"Dr. Daniel Düring" wrote:
>
>> I am trying to use wglShareLists for two threads within the same process.
>
>Do you mean you are trying to have two threads, each with their own OpenGL
>context, sharing the display lists and texture objects? Remember to call
>wglMakeCurrent() in each thread, specifying the context that belongs to
>that thread.
If he is, then he should stop doing it and put the OpenGL calls in the
same thread, if possible. (oh, it's faster that way)
>Tell us more precisely what you are doing, and what errors you are getting.
Ruud van Gaal, GPL Rank +53.53
MarketGraph / MachTech: http://www.marketgraph.nl
Pencil art: http://www.marketgraph.nl/gallery
The main application and the workerthread each have their own rendering
context. The former is constant, the latter is created
(wglCreateContext/wglMakeCurrent) and destroyed (wglDeleteContext) as
animation mode is entered or left.
Unfortunately no displaylist objects are shown.
Daniel
Andrew F. Vesper <ave...@wn.net> schrieb in im Newsbeitrag:
398B6CAD...@wn.net...
> "Dr. Daniel Düring" wrote:
>
> > I am trying to use wglShareLists for two threads within the same
process.
>
> Do you mean you are trying to have two threads, each with their own OpenGL
> context, sharing the display lists and texture objects? Remember to call
> wglMakeCurrent() in each thread, specifying the context that belongs to
> that thread.
>
> Tell us more precisely what you are doing, and what errors you are
getting.
Both rendering contexts are created with regard to the same device context
handle and thus the same pixel format. The return value of wglShareLists is
1 (TRUE), but no display list objects are drawn.
Dr. Daniel Düring <NOSPAM...@meteo-graphics.de> schrieb in im
Newsbeitrag: 8mmfep$iv5$1...@unlisys.unlisys.net...
> Addendum:
>
> Both rendering contexts are created with regard to the same device context
> handle and thus the same pixel format. The return value of wglShareLists is
> 1 (TRUE), but no display list objects are drawn.
Make sure that you call wglShareLists before any display lists are created by
the context which is going to share the lists (it is in the spec for
wglShareLists).
Some OpenGL drivers don't care about this but some do.
John Williams
QualECAD
Daniel
John Williams <john.w...@alumni.stanford.org> schrieb in im Newsbeitrag:
398ED864...@alumni.stanford.org...