info-inventor
[Top] [All Lists]

Example with threads and Inventor

To: info-inventor@xxxxxxxxxxx
Subject: Example with threads and Inventor
From: Johan Jansson <j.jansson@xxxxxxxxxxxxx>
Date: Mon, 12 Mar 2001 00:04:51 +0100 (CET)
Sender: owner-inventor@xxxxxxxxxxx
Hi everyone,

I've been trying to figure out how to decouple event handling from
Inventor, and tied together with that, how to do scene graph modification
and rendering in different threads. The problem was that if Inventor is in
charge of events, then it's never safe to touch the scene graph directly.
This might not generally be a problem, but I want to use Inventor only as
a scene graph. The example also moves rendering and event handling into
another thread, so that the main thread is not tied up with that. Anyway,
maybe someone will find this useful, and maybe even come up with some new
solutions.

Here is the (tiny) archive:
http://www.student.nada.kth.se/~d96-jja/misc/sdliv.tgz

There is a README with some information, but you need SDL, pthreads and
Open Inventor. The example is based on a Coin GLUT example.

If someone can figure out how to use SoXt to provide the rendering context
that would be welcome. I'm not sure it would be cleaner, because then
you'd have to use Xt event handling, but at least the need for SDL would
be eliminated.

I hope this is not offtopic..

  Johan Jansson


<Prev in Thread] Current Thread [Next in Thread>
  • Example with threads and Inventor, Johan Jansson <=