I think it is a bug. When I set Raster to CLIP_IMAGE mode, and main
raster point dissapears at left edge of view, raster starts to flicker.

I do update raster position on every frame from behavior. This is
probably the reason of flickering. When I have turned updates off, all
rasters behave the same - ones for which main point is on screen are
display correctly. Ones partially hidden on left side (for which
CLIP_IMAGE makes a difference) appear and disappear depending on how I
move the view. More or less every single pixel of movement makes them
appear and dissapear in turn - all are visible or not visible at same
moment, independent of their position.

Windows XP
jdk 1.4
java3d 1.3beta2/opengl
nvidia geforce 256

You can see the effect at http://nwn-j3d.sf.net/applet/viewer.html. Just
load any model and check on skeleton and then labels. Then move the
model at left edge of screen, so only parts of labels are visible and
wait a moment - it should flicker a bit. If you rotate model around at
edge, you will see a lot more flicker.


Appearance is

ap.setPointAttributes(new PointAttributes(8, true));
ap.setRenderingAttributes(new RenderingAttributes(false, true,
RenderingAttributes.ALWAYS, 0));
ap.setTransparencyAttributes(new
TransparencyAttributes(TransparencyAttributes.BLENDED, 0.3f));

Raster is constructed

Raster r = new Raster();
r.setCapability(Raster.ALLOW_POSITION_WRITE);
Rectangle2D rect = font.getStringBounds(name,renderContext);
r.setSize((int)rect.getWidth(),(int)rect.getHeight());
r.setType(Raster.RASTER_COLOR);
r.setClipMode(Raster.CLIP_IMAGE);
BufferedImage bi = new BufferedImage((int)rect.getWidth(),
        (int)rect.getHeight(),BufferedImage.TYPE_INT_RGB);
java.awt.Graphics2D g2 = bi.createGraphics();
g2.setColor(java.awt.Color.white);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
g2.drawString(name,0,(int)-rect.getY());
ImageComponent2D ic = new ImageComponent2D(
        ImageComponent.FORMAT_RGB,bi);
r.setImage(ic);
return r;


Artur

===========================================================================
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