If you don't get a satisfactory response here, consider posting the question to the perldl mailing list. There's at least one active list member there that uses TriD fairly heavily and may be able to help. Of course, there may be the same (or even better) assistance available right here.
Cheers, Rob | [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] |
Hi Brad,
I have done some work with PDL::Graphics::TriD and the only time I have noticed flicker is when my X server was configured to use software OpenGL rendering instead of the videocard's hardware rendering. If you are visualizing a large dataset or updating it with some intensive computation I might expect some lag when loading the new model, but not flicker. For example, I can throw 1,000,000 points into a model and stretch the window to 1600x1200 and rotate the plot all over the place without flicker. Doing the same thing while moving the points around generates a lot of lag between iterations, but no visible flicker. If the hardware rendering isn't the problem, could you provide some more information about the type of visualization you are doing (large dataset, frequent updates, etc.)? | [reply] [Watch: Dir/Any] |
Thanks for the suggestions
Hardware gl seems to be fine, glxgears runs smoothly:
$ glxinfo | grep -i direct
direct rendering: Yes
I'll follow up with more details soon, but I doubt volume
of the
data is the problem, it's quite modest by PDL standards,
and when I'm using the "twiddle" mode to look-around an
unchanging model there is no flicker. Previously I just
had a mesh which seemed ok but when I used a filled sheet
there is a noticeable flicker as the light sheet is draw
over the dark background.
I might not need double-buffering exactly, but a GL
equivalent that only draws once all the things to draw
are queued.
| [reply] [Watch: Dir/Any] [d/l] |
I found out what is going on,
PDL does double-buffer, at the line:
# PDL/Graphics/TriD/GL.pm" line 789
sub display {
# ...
$this->{_GLObject}->glXSwapBuffers();
}
display is called from twiddle
which does the model
fly-through stuff. My flicker came from using
hold3d, points3d then imag3d_ns
but points3d calls graph_object (calling
twiddle_current then twiddle), so the points were
drawn, the buffers swapped making imag3d_ns seem to
flicker. I just need to avoid the points3d shortcut,
and other forms using graph_object.
Brad | [reply] [Watch: Dir/Any] [d/l] |