I am not familiar with drawAndFlushImage but a long time ago I had a similar
problem with overlay-drawing in postSwap
and had to add the following line after 2D-drawing to avoid flickering:

   Toolkit.getDefaultToolkit().sync();

You can try that.

/Östen Lundahl


Hennie Kotze wrote:
Greetings

I really hope someone can help me with this problem. I have been battling
to
get Java3D introduced at our company, and had been given a few days to
come
up with a workable solution. All has been going well...until..*dramatic,
moody music*...the dreaded "overlay"! I tried this and that and the other,
all are far too slow or too limiting. Then came along drawAndFlushImage.
What a relief! The framerate hardly dropped, the quality of the graphics
superb, everything but for one little problem was very OK. The little
problem then slowly grew and became a nuisance, then an obstacle, and now
it
is threatening to kill my entire two weeks of blood, sweat and tears.

HELP!

Using:j3d 1.3b2, DirectX9, jdk1.5.0

I have a drawing routine inside a class (extending Behavior) with a
WakeupOnElapsedFrames(0, true) that draws onto a
BufferedImage.TYPE_4BYTE_ABGR, which in turn gets drawn onto the canvas3D
by
drawAndFlushImage(bufimg, 0, 0, null). I have enabled/disabled double
buffering on the canvas, I am flushing my j3DGraphics2D, I am doing
everything I am supposed to. I have tried possibly every order and
sort...swapping lines of code around, commenting out, duplicating,
etc...but
the darn thing flickers madly.

It seems as if the drawing of the overlay and the drawing of the 3D scene
take turns being rendered, at other times each gets partially rendered
onto
the same frame.

The overlay needs to be refreshed and redrawn on each frame with crisp,
aliased graphics, because it is a simulation of the video display of a
military helicopter which displays real-time flight, target and weapons
info.

Through my travels across the internet in search of answers it has become
clear that the overlay thing is a major issue for j3d, and that no real
solution exists. This relatively minor hassle seriously impedes the growth
of the j3d community and the popularity of the platform, and should be
addressed by sun as a matter of grave urgency!

In the mean time, please, any words of advice (or even heart-felt
condolences) will be gladly and gratefully appreciated.

Yours in java

Hennie Kotze

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".


===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to