I would like to use DX inside of Qt (the GUI by Trolltech).
Moreover, I am sending numerical fields using sockets and so
I need some synchronization, for example, I first must be sure
I successfully established a socket before sending data.  Or
perhaps a better example: it takes a long time to draw isosurfaces
and (it seems to me) I can cause a crash or at least a loss of
coherence between the driver and DX if I change the field while
the first isosurface is still being drawn.  My program runs my Qt
application and it sometimes runs long enough to see isosurfaces
of fields in various DX windows, but it fails at random points in
time.  I assumed that the problem was the wait commands such as
DXLSync() in the main Qt thread.  The main Qt thread should not
call "heavy" tasks because it must respond to window events.
And in fact, it is sure to fail if I move windows while DX is
receiving fields and drawing many isosurfaces.

   So I put my DX driver code in another thread.  But now,
everytime I call DXLSync() the function never returns.
  I have not used
    DXLError DXLInitializeXMainLoop(XtAppContext app, DXLConnection *conn)
because I do not know how to use it in the context of Qt.  First of all,
the DX application starts after Qt, whereas the documentation says
to call DXLInitializeXMainLoop() before the X11 main loop begins.
Second of all, I do not know what my "XtAppContext app" is because
I am not writing the X11 application at that low level.  Moreover,
DXLInitializeXMainLoop() may not be necessary (???) because DXLSync()
does not block when it is in the main thread.

   Though my mode of using DX may seem rather exotic, it seems to me
to be an excellent idea to have the great flexibility of Qt while
having the display of three-dimensional data.  Moreover, the logic
of the code works, except for the major problem of handling of events.

Alan Scheinine  Email: [EMAIL PROTECTED]

Reply via email to